Ruby 3.2.0dev (2022-06-11 revision 0e2c01bd094617f5c82759bdab03bb786ce89d56)
rb_mjit_min_header-2.7.0.h
1#ifdef __GNUC__
2# pragma GCC system_header
3#endif
4#define ALWAYS_INLINE(x) __attribute__ ((__always_inline__)) x
5
6typedef long unsigned int size_t;
7typedef __builtin_va_list __gnuc_va_list;
8typedef unsigned char __u_char;
9typedef unsigned short int __u_short;
10typedef unsigned int __u_int;
11typedef unsigned long int __u_long;
12typedef signed char __int8_t;
13typedef unsigned char __uint8_t;
14typedef signed short int __int16_t;
15typedef unsigned short int __uint16_t;
16typedef signed int __int32_t;
17typedef unsigned int __uint32_t;
18typedef signed long int __int64_t;
19typedef unsigned long int __uint64_t;
20typedef __int8_t __int_least8_t;
21typedef __uint8_t __uint_least8_t;
22typedef __int16_t __int_least16_t;
23typedef __uint16_t __uint_least16_t;
24typedef __int32_t __int_least32_t;
25typedef __uint32_t __uint_least32_t;
26typedef __int64_t __int_least64_t;
27typedef __uint64_t __uint_least64_t;
28typedef long int __quad_t;
29typedef unsigned long int __u_quad_t;
30typedef long int __intmax_t;
31typedef unsigned long int __uintmax_t;
32typedef unsigned long int __dev_t;
33typedef unsigned int __uid_t;
34typedef unsigned int __gid_t;
35typedef unsigned long int __ino_t;
36typedef unsigned long int __ino64_t;
37typedef unsigned int __mode_t;
38typedef unsigned long int __nlink_t;
39typedef long int __off_t;
40typedef long int __off64_t;
41typedef int __pid_t;
42typedef struct { int __val[2]; } __fsid_t;
43typedef long int __clock_t;
44typedef unsigned long int __rlim_t;
45typedef unsigned long int __rlim64_t;
46typedef unsigned int __id_t;
47typedef long int __time_t;
48typedef unsigned int __useconds_t;
49typedef long int __suseconds_t;
50typedef int __daddr_t;
51typedef int __key_t;
52typedef int __clockid_t;
53typedef void * __timer_t;
54typedef long int __blksize_t;
55typedef long int __blkcnt_t;
56typedef long int __blkcnt64_t;
57typedef unsigned long int __fsblkcnt_t;
58typedef unsigned long int __fsblkcnt64_t;
59typedef unsigned long int __fsfilcnt_t;
60typedef unsigned long int __fsfilcnt64_t;
61typedef long int __fsword_t;
62typedef long int __ssize_t;
63typedef long int __syscall_slong_t;
64typedef unsigned long int __syscall_ulong_t;
65typedef __off64_t __loff_t;
66typedef char *__caddr_t;
67typedef long int __intptr_t;
68typedef unsigned int __socklen_t;
69typedef int __sig_atomic_t;
70typedef struct
71{
72 int __count;
73 union
74 {
75 unsigned int __wch;
76 char __wchb[4];
77 } __value;
79typedef struct _G_fpos_t
80{
81 __off_t __pos;
82 __mbstate_t __state;
83} __fpos_t;
84typedef struct _G_fpos64_t
85{
86 __off64_t __pos;
87 __mbstate_t __state;
89struct _IO_FILE;
90typedef struct _IO_FILE __FILE;
91struct _IO_FILE;
92typedef struct _IO_FILE FILE;
93struct _IO_FILE;
94struct _IO_marker;
95struct _IO_codecvt;
96struct _IO_wide_data;
97typedef void _IO_lock_t;
98struct _IO_FILE
99{
100 int _flags;
101 char *_IO_read_ptr;
102 char *_IO_read_end;
103 char *_IO_read_base;
104 char *_IO_write_base;
105 char *_IO_write_ptr;
106 char *_IO_write_end;
107 char *_IO_buf_base;
108 char *_IO_buf_end;
109 char *_IO_save_base;
110 char *_IO_backup_base;
111 char *_IO_save_end;
112 struct _IO_marker *_markers;
113 struct _IO_FILE *_chain;
114 int _fileno;
115 int _flags2;
116 __off_t _old_offset;
117 unsigned short _cur_column;
118 signed char _vtable_offset;
119 char _shortbuf[1];
120 _IO_lock_t *_lock;
121 __off64_t _offset;
122 struct _IO_codecvt *_codecvt;
123 struct _IO_wide_data *_wide_data;
124 struct _IO_FILE *_freeres_list;
125 void *_freeres_buf;
126 size_t __pad5;
127 int _mode;
128 char _unused2[15 * sizeof (int) - 4 * sizeof (void *) - sizeof (size_t)];
129};
130typedef __ssize_t cookie_read_function_t (void *__cookie, char *__buf,
131 size_t __nbytes);
132typedef __ssize_t cookie_write_function_t (void *__cookie, const char *__buf,
133 size_t __nbytes);
134typedef int cookie_seek_function_t (void *__cookie, __off64_t *__pos, int __w);
135typedef int cookie_close_function_t (void *__cookie);
136typedef struct _IO_cookie_io_functions_t
137{
138 cookie_read_function_t *read;
139 cookie_write_function_t *write;
140 cookie_seek_function_t *seek;
141 cookie_close_function_t *close;
143typedef __gnuc_va_list va_list;
144typedef __off_t off_t;
145typedef __off64_t off64_t;
146typedef __ssize_t ssize_t;
147typedef __fpos_t fpos_t;
148typedef __fpos64_t fpos64_t;
149extern FILE *stdin;
150extern FILE *stdout;
151extern FILE *stderr;
152extern int remove (const char *__filename) __attribute__ ((__nothrow__ , __leaf__));
153extern int rename (const char *__old, const char *__new) __attribute__ ((__nothrow__ , __leaf__));
154extern int renameat (int __oldfd, const char *__old, int __newfd,
155 const char *__new) __attribute__ ((__nothrow__ , __leaf__));
156extern int renameat2 (int __oldfd, const char *__old, int __newfd,
157 const char *__new, unsigned int __flags) __attribute__ ((__nothrow__ , __leaf__));
158extern FILE *tmpfile (void) __attribute__ ((__warn_unused_result__));
159extern FILE *tmpfile64 (void) __attribute__ ((__warn_unused_result__));
160extern char *tmpnam (char *__s) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
161extern char *tmpnam_r (char *__s) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
162extern char *tempnam (const char *__dir, const char *__pfx)
163 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__));
164extern int fclose (FILE *__stream);
165extern int fflush (FILE *__stream);
166extern int fflush_unlocked (FILE *__stream);
167extern int fcloseall (void);
168extern FILE *fopen (const char *__restrict __filename,
169 const char *__restrict __modes) __attribute__ ((__warn_unused_result__));
170extern FILE *freopen (const char *__restrict __filename,
171 const char *__restrict __modes,
172 FILE *__restrict __stream) __attribute__ ((__warn_unused_result__));
173extern FILE *fopen64 (const char *__restrict __filename,
174 const char *__restrict __modes) __attribute__ ((__warn_unused_result__));
175extern FILE *freopen64 (const char *__restrict __filename,
176 const char *__restrict __modes,
177 FILE *__restrict __stream) __attribute__ ((__warn_unused_result__));
178extern FILE *fdopen (int __fd, const char *__modes) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
179extern FILE *fopencookie (void *__restrict __magic_cookie,
180 const char *__restrict __modes,
181 cookie_io_functions_t __io_funcs) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
182extern FILE *fmemopen (void *__s, size_t __len, const char *__modes)
183 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
184extern FILE *open_memstream (char **__bufloc, size_t *__sizeloc) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
185extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) __attribute__ ((__nothrow__ , __leaf__));
186extern int setvbuf (FILE *__restrict __stream, char *__restrict __buf,
187 int __modes, size_t __n) __attribute__ ((__nothrow__ , __leaf__));
188extern void setbuffer (FILE *__restrict __stream, char *__restrict __buf,
189 size_t __size) __attribute__ ((__nothrow__ , __leaf__));
190extern void setlinebuf (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__));
191extern int fprintf (FILE *__restrict __stream,
192 const char *__restrict __format, ...);
193extern int printf (const char *__restrict __format, ...);
194extern int sprintf (char *__restrict __s,
195 const char *__restrict __format, ...) __attribute__ ((__nothrow__));
196extern int vfprintf (FILE *__restrict __s, const char *__restrict __format,
197 __gnuc_va_list __arg);
198extern int vprintf (const char *__restrict __format, __gnuc_va_list __arg);
199extern int vsprintf (char *__restrict __s, const char *__restrict __format,
200 __gnuc_va_list __arg) __attribute__ ((__nothrow__));
201extern int snprintf (char *__restrict __s, size_t __maxlen,
202 const char *__restrict __format, ...)
203 __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 4)));
204extern int vsnprintf (char *__restrict __s, size_t __maxlen,
205 const char *__restrict __format, __gnuc_va_list __arg)
206 __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 0)));
207extern int vasprintf (char **__restrict __ptr, const char *__restrict __f,
208 __gnuc_va_list __arg)
209 __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 0))) __attribute__ ((__warn_unused_result__));
210extern int __asprintf (char **__restrict __ptr,
211 const char *__restrict __fmt, ...)
212 __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 3))) __attribute__ ((__warn_unused_result__));
213extern int asprintf (char **__restrict __ptr,
214 const char *__restrict __fmt, ...)
215 __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 3))) __attribute__ ((__warn_unused_result__));
216extern int vdprintf (int __fd, const char *__restrict __fmt,
217 __gnuc_va_list __arg)
218 __attribute__ ((__format__ (__printf__, 2, 0)));
219extern int dprintf (int __fd, const char *__restrict __fmt, ...)
220 __attribute__ ((__format__ (__printf__, 2, 3)));
221extern int fscanf (FILE *__restrict __stream,
222 const char *__restrict __format, ...) __attribute__ ((__warn_unused_result__));
223extern int scanf (const char *__restrict __format, ...) __attribute__ ((__warn_unused_result__));
224extern int sscanf (const char *__restrict __s,
225 const char *__restrict __format, ...) __attribute__ ((__nothrow__ , __leaf__));
226extern int fscanf (FILE *__restrict __stream, const char *__restrict __format, ...) __asm__ ("" "__isoc99_fscanf") __attribute__ ((__warn_unused_result__));
227extern int scanf (const char *__restrict __format, ...) __asm__ ("" "__isoc99_scanf") __attribute__ ((__warn_unused_result__));
228extern int sscanf (const char *__restrict __s, const char *__restrict __format, ...) __asm__ ("" "__isoc99_sscanf") __attribute__ ((__nothrow__ , __leaf__));
229extern int vfscanf (FILE *__restrict __s, const char *__restrict __format,
230 __gnuc_va_list __arg)
231 __attribute__ ((__format__ (__scanf__, 2, 0))) __attribute__ ((__warn_unused_result__));
232extern int vscanf (const char *__restrict __format, __gnuc_va_list __arg)
233 __attribute__ ((__format__ (__scanf__, 1, 0))) __attribute__ ((__warn_unused_result__));
234extern int vsscanf (const char *__restrict __s,
235 const char *__restrict __format, __gnuc_va_list __arg)
236 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__format__ (__scanf__, 2, 0)));
237extern int vfscanf (FILE *__restrict __s, const char *__restrict __format, __gnuc_va_list __arg) __asm__ ("" "__isoc99_vfscanf")
238 __attribute__ ((__format__ (__scanf__, 2, 0))) __attribute__ ((__warn_unused_result__));
239extern int vscanf (const char *__restrict __format, __gnuc_va_list __arg) __asm__ ("" "__isoc99_vscanf")
240 __attribute__ ((__format__ (__scanf__, 1, 0))) __attribute__ ((__warn_unused_result__));
241extern int vsscanf (const char *__restrict __s, const char *__restrict __format, __gnuc_va_list __arg) __asm__ ("" "__isoc99_vsscanf") __attribute__ ((__nothrow__ , __leaf__))
242 __attribute__ ((__format__ (__scanf__, 2, 0)));
243extern int fgetc (FILE *__stream);
244extern int getc (FILE *__stream);
245extern int getchar (void);
246extern int getc_unlocked (FILE *__stream);
247extern int getchar_unlocked (void);
248extern int fgetc_unlocked (FILE *__stream);
249extern int fputc (int __c, FILE *__stream);
250extern int putc (int __c, FILE *__stream);
251extern int putchar (int __c);
252extern int fputc_unlocked (int __c, FILE *__stream);
253extern int putc_unlocked (int __c, FILE *__stream);
254extern int putchar_unlocked (int __c);
255extern int getw (FILE *__stream);
256extern int putw (int __w, FILE *__stream);
257extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream)
258 __attribute__ ((__warn_unused_result__));
259extern char *fgets_unlocked (char *__restrict __s, int __n,
260 FILE *__restrict __stream) __attribute__ ((__warn_unused_result__));
261extern __ssize_t __getdelim (char **__restrict __lineptr,
262 size_t *__restrict __n, int __delimiter,
263 FILE *__restrict __stream) __attribute__ ((__warn_unused_result__));
264extern __ssize_t getdelim (char **__restrict __lineptr,
265 size_t *__restrict __n, int __delimiter,
266 FILE *__restrict __stream) __attribute__ ((__warn_unused_result__));
267extern __ssize_t getline (char **__restrict __lineptr,
268 size_t *__restrict __n,
269 FILE *__restrict __stream) __attribute__ ((__warn_unused_result__));
270extern int fputs (const char *__restrict __s, FILE *__restrict __stream);
271extern int puts (const char *__s);
272extern int ungetc (int __c, FILE *__stream);
273extern size_t fread (void *__restrict __ptr, size_t __size,
274 size_t __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__));
275extern size_t fwrite (const void *__restrict __ptr, size_t __size,
276 size_t __n, FILE *__restrict __s);
277extern int fputs_unlocked (const char *__restrict __s,
278 FILE *__restrict __stream);
279extern size_t fread_unlocked (void *__restrict __ptr, size_t __size,
280 size_t __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__));
281extern size_t fwrite_unlocked (const void *__restrict __ptr, size_t __size,
282 size_t __n, FILE *__restrict __stream);
283extern int fseek (FILE *__stream, long int __off, int __whence);
284extern long int ftell (FILE *__stream) __attribute__ ((__warn_unused_result__));
285extern void rewind (FILE *__stream);
286extern int fseeko (FILE *__stream, __off_t __off, int __whence);
287extern __off_t ftello (FILE *__stream) __attribute__ ((__warn_unused_result__));
288extern int fgetpos (FILE *__restrict __stream, fpos_t *__restrict __pos);
289extern int fsetpos (FILE *__stream, const fpos_t *__pos);
290extern int fseeko64 (FILE *__stream, __off64_t __off, int __whence);
291extern __off64_t ftello64 (FILE *__stream) __attribute__ ((__warn_unused_result__));
292extern int fgetpos64 (FILE *__restrict __stream, fpos64_t *__restrict __pos);
293extern int fsetpos64 (FILE *__stream, const fpos64_t *__pos);
294extern void clearerr (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__));
295extern int feof (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
296extern int ferror (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
297extern void clearerr_unlocked (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__));
298extern int feof_unlocked (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
299extern int ferror_unlocked (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
300extern void perror (const char *__s);
301extern int sys_nerr;
302extern const char *const sys_errlist[];
303extern int _sys_nerr;
304extern const char *const _sys_errlist[];
305extern int fileno (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
306extern int fileno_unlocked (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
307extern FILE *popen (const char *__command, const char *__modes) __attribute__ ((__warn_unused_result__));
308extern int pclose (FILE *__stream);
309extern char *ctermid (char *__s) __attribute__ ((__nothrow__ , __leaf__));
310extern char *cuserid (char *__s);
311struct obstack;
312extern int obstack_printf (struct obstack *__restrict __obstack,
313 const char *__restrict __format, ...)
314 __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 3)));
315extern int obstack_vprintf (struct obstack *__restrict __obstack,
316 const char *__restrict __format,
317 __gnuc_va_list __args)
318 __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 0)));
319extern void flockfile (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__));
320extern int ftrylockfile (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
321extern void funlockfile (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__));
322extern int __uflow (FILE *);
323extern int __overflow (FILE *, int);
324extern __inline __attribute__ ((__gnu_inline__)) int
325getchar (void)
326{
327 return getc (stdin);
328}
329extern __inline __attribute__ ((__gnu_inline__)) int
330fgetc_unlocked (FILE *__fp)
331{
332 return (__builtin_expect (((__fp)->_IO_read_ptr >= (__fp)->_IO_read_end), 0) ? __uflow (__fp) : *(unsigned char *) (__fp)->_IO_read_ptr++);
333}
334extern __inline __attribute__ ((__gnu_inline__)) int
335getc_unlocked (FILE *__fp)
336{
337 return (__builtin_expect (((__fp)->_IO_read_ptr >= (__fp)->_IO_read_end), 0) ? __uflow (__fp) : *(unsigned char *) (__fp)->_IO_read_ptr++);
338}
339extern __inline __attribute__ ((__gnu_inline__)) int
340getchar_unlocked (void)
341{
342 return (__builtin_expect (((stdin)->_IO_read_ptr >= (stdin)->_IO_read_end), 0) ? __uflow (stdin) : *(unsigned char *) (stdin)->_IO_read_ptr++);
343}
344extern __inline __attribute__ ((__gnu_inline__)) int
345putchar (int __c)
346{
347 return putc (__c, stdout);
348}
349extern __inline __attribute__ ((__gnu_inline__)) int
350fputc_unlocked (int __c, FILE *__stream)
351{
352 return (__builtin_expect (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c)));
353}
354extern __inline __attribute__ ((__gnu_inline__)) int
355putc_unlocked (int __c, FILE *__stream)
356{
357 return (__builtin_expect (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c)));
358}
359extern __inline __attribute__ ((__gnu_inline__)) int
360putchar_unlocked (int __c)
361{
362 return (__builtin_expect (((stdout)->_IO_write_ptr >= (stdout)->_IO_write_end), 0) ? __overflow (stdout, (unsigned char) (__c)) : (unsigned char) (*(stdout)->_IO_write_ptr++ = (__c)));
363}
364extern __inline __attribute__ ((__gnu_inline__)) __ssize_t
365getline (char **__lineptr, size_t *__n, FILE *__stream)
366{
367 return __getdelim (__lineptr, __n, '\n', __stream);
368}
369extern __inline __attribute__ ((__gnu_inline__)) int
370__attribute__ ((__nothrow__ , __leaf__)) feof_unlocked (FILE *__stream)
371{
372 return (((__stream)->_flags & 0x0010) != 0);
373}
374extern __inline __attribute__ ((__gnu_inline__)) int
375__attribute__ ((__nothrow__ , __leaf__)) ferror_unlocked (FILE *__stream)
376{
377 return (((__stream)->_flags & 0x0020) != 0);
378}
379extern int __sprintf_chk (char *__restrict __s, int __flag, size_t __slen,
380 const char *__restrict __format, ...) __attribute__ ((__nothrow__ , __leaf__));
381extern int __vsprintf_chk (char *__restrict __s, int __flag, size_t __slen,
382 const char *__restrict __format,
383 __gnuc_va_list __ap) __attribute__ ((__nothrow__ , __leaf__));
384extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
385__attribute__ ((__nothrow__ , __leaf__)) sprintf (char *__restrict __s, const char *__restrict __fmt, ...)
386{
387 return __builtin___sprintf_chk (__s, 2 - 1,
388 __builtin_object_size (__s, 2 > 1), __fmt, __builtin_va_arg_pack ());
389}
390extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
391__attribute__ ((__nothrow__ , __leaf__)) vsprintf (char *__restrict __s, const char *__restrict __fmt, __gnuc_va_list __ap)
392{
393 return __builtin___vsprintf_chk (__s, 2 - 1,
394 __builtin_object_size (__s, 2 > 1), __fmt, __ap);
395}
396extern int __snprintf_chk (char *__restrict __s, size_t __n, int __flag,
397 size_t __slen, const char *__restrict __format,
398 ...) __attribute__ ((__nothrow__ , __leaf__));
399extern int __vsnprintf_chk (char *__restrict __s, size_t __n, int __flag,
400 size_t __slen, const char *__restrict __format,
401 __gnuc_va_list __ap) __attribute__ ((__nothrow__ , __leaf__));
402extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
403__attribute__ ((__nothrow__ , __leaf__)) snprintf (char *__restrict __s, size_t __n, const char *__restrict __fmt, ...)
404{
405 return __builtin___snprintf_chk (__s, __n, 2 - 1,
406 __builtin_object_size (__s, 2 > 1), __fmt, __builtin_va_arg_pack ());
407}
408extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
409__attribute__ ((__nothrow__ , __leaf__)) vsnprintf (char *__restrict __s, size_t __n, const char *__restrict __fmt, __gnuc_va_list __ap)
410{
411 return __builtin___vsnprintf_chk (__s, __n, 2 - 1,
412 __builtin_object_size (__s, 2 > 1), __fmt, __ap);
413}
414extern int __fprintf_chk (FILE *__restrict __stream, int __flag,
415 const char *__restrict __format, ...);
416extern int __printf_chk (int __flag, const char *__restrict __format, ...);
417extern int __vfprintf_chk (FILE *__restrict __stream, int __flag,
418 const char *__restrict __format, __gnuc_va_list __ap);
419extern int __vprintf_chk (int __flag, const char *__restrict __format,
420 __gnuc_va_list __ap);
421extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
422fprintf (FILE *__restrict __stream, const char *__restrict __fmt, ...)
423{
424 return __fprintf_chk (__stream, 2 - 1, __fmt,
425 __builtin_va_arg_pack ());
426}
427extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
428printf (const char *__restrict __fmt, ...)
429{
430 return __printf_chk (2 - 1, __fmt, __builtin_va_arg_pack ());
431}
432extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
433vprintf (const char *__restrict __fmt, __gnuc_va_list __ap)
434{
435 return __vfprintf_chk (stdout, 2 - 1, __fmt, __ap);
436}
437extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
438vfprintf (FILE *__restrict __stream,
439 const char *__restrict __fmt, __gnuc_va_list __ap)
440{
441 return __vfprintf_chk (__stream, 2 - 1, __fmt, __ap);
442}
443extern int __dprintf_chk (int __fd, int __flag, const char *__restrict __fmt,
444 ...) __attribute__ ((__format__ (__printf__, 3, 4)));
445extern int __vdprintf_chk (int __fd, int __flag,
446 const char *__restrict __fmt, __gnuc_va_list __arg)
447 __attribute__ ((__format__ (__printf__, 3, 0)));
448extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
449dprintf (int __fd, const char *__restrict __fmt, ...)
450{
451 return __dprintf_chk (__fd, 2 - 1, __fmt,
452 __builtin_va_arg_pack ());
453}
454extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
455vdprintf (int __fd, const char *__restrict __fmt, __gnuc_va_list __ap)
456{
457 return __vdprintf_chk (__fd, 2 - 1, __fmt, __ap);
458}
459extern int __asprintf_chk (char **__restrict __ptr, int __flag,
460 const char *__restrict __fmt, ...)
461 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__format__ (__printf__, 3, 4))) __attribute__ ((__warn_unused_result__));
462extern int __vasprintf_chk (char **__restrict __ptr, int __flag,
463 const char *__restrict __fmt, __gnuc_va_list __arg)
464 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__format__ (__printf__, 3, 0))) __attribute__ ((__warn_unused_result__));
465extern int __obstack_printf_chk (struct obstack *__restrict __obstack,
466 int __flag, const char *__restrict __format,
467 ...)
468 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__format__ (__printf__, 3, 4)));
469extern int __obstack_vprintf_chk (struct obstack *__restrict __obstack,
470 int __flag,
471 const char *__restrict __format,
472 __gnuc_va_list __args)
473 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__format__ (__printf__, 3, 0)));
474extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
475__attribute__ ((__nothrow__ , __leaf__)) asprintf (char **__restrict __ptr, const char *__restrict __fmt, ...)
476{
477 return __asprintf_chk (__ptr, 2 - 1, __fmt,
478 __builtin_va_arg_pack ());
479}
480extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
481__attribute__ ((__nothrow__ , __leaf__)) __asprintf (char **__restrict __ptr, const char *__restrict __fmt, ...)
482{
483 return __asprintf_chk (__ptr, 2 - 1, __fmt,
484 __builtin_va_arg_pack ());
485}
486extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
487__attribute__ ((__nothrow__ , __leaf__)) obstack_printf (struct obstack *__restrict __obstack, const char *__restrict __fmt, ...)
488{
489 return __obstack_printf_chk (__obstack, 2 - 1, __fmt,
490 __builtin_va_arg_pack ());
491}
492extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
493__attribute__ ((__nothrow__ , __leaf__)) vasprintf (char **__restrict __ptr, const char *__restrict __fmt, __gnuc_va_list __ap)
494{
495 return __vasprintf_chk (__ptr, 2 - 1, __fmt, __ap);
496}
497extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
498__attribute__ ((__nothrow__ , __leaf__)) obstack_vprintf (struct obstack *__restrict __obstack, const char *__restrict __fmt, __gnuc_va_list __ap)
499{
500 return __obstack_vprintf_chk (__obstack, 2 - 1, __fmt,
501 __ap);
502}
503extern char *__fgets_chk (char *__restrict __s, size_t __size, int __n,
504 FILE *__restrict __stream) __attribute__ ((__warn_unused_result__));
505extern char *__fgets_alias (char *__restrict __s, int __n, FILE *__restrict __stream) __asm__ ("" "fgets") __attribute__ ((__warn_unused_result__));
506extern char *__fgets_chk_warn (char *__restrict __s, size_t __size, int __n, FILE *__restrict __stream) __asm__ ("" "__fgets_chk")
507 __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fgets called with bigger size than length " "of destination buffer")));
508extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) char *
509fgets (char *__restrict __s, int __n, FILE *__restrict __stream)
510{
511 if (__builtin_object_size (__s, 2 > 1) != (size_t) -1)
512 {
513 if (!__builtin_constant_p (__n) || __n <= 0)
514 return __fgets_chk (__s, __builtin_object_size (__s, 2 > 1), __n, __stream);
515 if ((size_t) __n > __builtin_object_size (__s, 2 > 1))
516 return __fgets_chk_warn (__s, __builtin_object_size (__s, 2 > 1), __n, __stream);
517 }
518 return __fgets_alias (__s, __n, __stream);
519}
520extern size_t __fread_chk (void *__restrict __ptr, size_t __ptrlen,
521 size_t __size, size_t __n,
522 FILE *__restrict __stream) __attribute__ ((__warn_unused_result__));
523extern size_t __fread_alias (void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "fread") __attribute__ ((__warn_unused_result__));
524extern size_t __fread_chk_warn (void *__restrict __ptr, size_t __ptrlen, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "__fread_chk")
525 __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fread called with bigger size * nmemb than length " "of destination buffer")));
526extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) size_t
527fread (void *__restrict __ptr, size_t __size, size_t __n,
528 FILE *__restrict __stream)
529{
530 if (__builtin_object_size (__ptr, 0) != (size_t) -1)
531 {
532 if (!__builtin_constant_p (__size)
533 || !__builtin_constant_p (__n)
534 || (__size | __n) >= (((size_t) 1) << (8 * sizeof (size_t) / 2)))
535 return __fread_chk (__ptr, __builtin_object_size (__ptr, 0), __size, __n, __stream);
536 if (__size * __n > __builtin_object_size (__ptr, 0))
537 return __fread_chk_warn (__ptr, __builtin_object_size (__ptr, 0), __size, __n, __stream);
538 }
539 return __fread_alias (__ptr, __size, __n, __stream);
540}
541extern char *__fgets_unlocked_chk (char *__restrict __s, size_t __size,
542 int __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__));
543extern char *__fgets_unlocked_alias (char *__restrict __s, int __n, FILE *__restrict __stream) __asm__ ("" "fgets_unlocked") __attribute__ ((__warn_unused_result__));
544extern char *__fgets_unlocked_chk_warn (char *__restrict __s, size_t __size, int __n, FILE *__restrict __stream) __asm__ ("" "__fgets_unlocked_chk")
545 __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fgets_unlocked called with bigger size than length " "of destination buffer")));
546extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) char *
547fgets_unlocked (char *__restrict __s, int __n, FILE *__restrict __stream)
548{
549 if (__builtin_object_size (__s, 2 > 1) != (size_t) -1)
550 {
551 if (!__builtin_constant_p (__n) || __n <= 0)
552 return __fgets_unlocked_chk (__s, __builtin_object_size (__s, 2 > 1), __n, __stream);
553 if ((size_t) __n > __builtin_object_size (__s, 2 > 1))
554 return __fgets_unlocked_chk_warn (__s, __builtin_object_size (__s, 2 > 1), __n, __stream);
555 }
556 return __fgets_unlocked_alias (__s, __n, __stream);
557}
558extern size_t __fread_unlocked_chk (void *__restrict __ptr, size_t __ptrlen,
559 size_t __size, size_t __n,
560 FILE *__restrict __stream) __attribute__ ((__warn_unused_result__));
561extern size_t __fread_unlocked_alias (void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "fread_unlocked") __attribute__ ((__warn_unused_result__));
562extern size_t __fread_unlocked_chk_warn (void *__restrict __ptr, size_t __ptrlen, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "__fread_unlocked_chk")
563 __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fread_unlocked called with bigger size * nmemb than " "length of destination buffer")));
564extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) size_t
565fread_unlocked (void *__restrict __ptr, size_t __size, size_t __n,
566 FILE *__restrict __stream)
567{
568 if (__builtin_object_size (__ptr, 0) != (size_t) -1)
569 {
570 if (!__builtin_constant_p (__size)
571 || !__builtin_constant_p (__n)
572 || (__size | __n) >= (((size_t) 1) << (8 * sizeof (size_t) / 2)))
573 return __fread_unlocked_chk (__ptr, __builtin_object_size (__ptr, 0), __size, __n,
574 __stream);
575 if (__size * __n > __builtin_object_size (__ptr, 0))
576 return __fread_unlocked_chk_warn (__ptr, __builtin_object_size (__ptr, 0), __size, __n,
577 __stream);
578 }
579 if (__builtin_constant_p (__size)
580 && __builtin_constant_p (__n)
581 && (__size | __n) < (((size_t) 1) << (8 * sizeof (size_t) / 2))
582 && __size * __n <= 8)
583 {
584 size_t __cnt = __size * __n;
585 char *__cptr = (char *) __ptr;
586 if (__cnt == 0)
587 return 0;
588 for (; __cnt > 0; --__cnt)
589 {
590 int __c = getc_unlocked (__stream);
591 if (__c == (-1))
592 break;
593 *__cptr++ = __c;
594 }
595 return (__cptr - (char *) __ptr) / __size;
596 }
597 return __fread_unlocked_alias (__ptr, __size, __n, __stream);
598}
599
600
601typedef __u_char u_char;
602typedef __u_short u_short;
603typedef __u_int u_int;
604typedef __u_long u_long;
605typedef __quad_t quad_t;
606typedef __u_quad_t u_quad_t;
607typedef __fsid_t fsid_t;
608typedef __loff_t loff_t;
609typedef __ino_t ino_t;
610typedef __ino64_t ino64_t;
611typedef __dev_t dev_t;
612typedef __gid_t gid_t;
613typedef __mode_t mode_t;
614typedef __nlink_t nlink_t;
615typedef __uid_t uid_t;
616typedef __pid_t pid_t;
617typedef __id_t id_t;
618typedef __daddr_t daddr_t;
619typedef __caddr_t caddr_t;
620typedef __key_t key_t;
621typedef __clock_t clock_t;
622typedef __clockid_t clockid_t;
623typedef __time_t time_t;
624typedef __timer_t timer_t;
625typedef __useconds_t useconds_t;
626typedef __suseconds_t suseconds_t;
627typedef unsigned long int ulong;
628typedef unsigned short int ushort;
629typedef unsigned int uint;
630typedef __int8_t int8_t;
631typedef __int16_t int16_t;
632typedef __int32_t int32_t;
633typedef __int64_t int64_t;
634typedef __uint8_t u_int8_t;
635typedef __uint16_t u_int16_t;
636typedef __uint32_t u_int32_t;
637typedef __uint64_t u_int64_t;
638typedef int register_t __attribute__ ((__mode__ (__word__)));
639static __inline __uint16_t
640__bswap_16 (__uint16_t __bsx)
641{
642 return __builtin_bswap16 (__bsx);
643}
644static __inline __uint32_t
645__bswap_32 (__uint32_t __bsx)
646{
647 return __builtin_bswap32 (__bsx);
648}
649__extension__ static __inline __uint64_t
650__bswap_64 (__uint64_t __bsx)
651{
652 return __builtin_bswap64 (__bsx);
653}
654static __inline __uint16_t
655__uint16_identity (__uint16_t __x)
656{
657 return __x;
658}
659static __inline __uint32_t
660__uint32_identity (__uint32_t __x)
661{
662 return __x;
663}
664static __inline __uint64_t
665__uint64_identity (__uint64_t __x)
666{
667 return __x;
668}
669typedef struct
670{
671 unsigned long int __val[(1024 / (8 * sizeof (unsigned long int)))];
672} __sigset_t;
673typedef __sigset_t sigset_t;
674struct timeval
675{
676 __time_t tv_sec;
677 __suseconds_t tv_usec;
678};
679struct timespec
680{
681 __time_t tv_sec;
682 __syscall_slong_t tv_nsec;
683};
684typedef long int __fd_mask;
685typedef struct
686 {
687 __fd_mask fds_bits[1024 / (8 * (int) sizeof (__fd_mask))];
688 } fd_set;
689typedef __fd_mask fd_mask;
690
691extern int select (int __nfds, fd_set *__restrict __readfds,
692 fd_set *__restrict __writefds,
693 fd_set *__restrict __exceptfds,
694 struct timeval *__restrict __timeout);
695extern int pselect (int __nfds, fd_set *__restrict __readfds,
696 fd_set *__restrict __writefds,
697 fd_set *__restrict __exceptfds,
698 const struct timespec *__restrict __timeout,
699 const __sigset_t *__restrict __sigmask);
700extern long int __fdelt_chk (long int __d);
701extern long int __fdelt_warn (long int __d)
702 __attribute__((__warning__ ("bit outside of fd_set selected")));
703
704typedef __blksize_t blksize_t;
705typedef __blkcnt_t blkcnt_t;
706typedef __fsblkcnt_t fsblkcnt_t;
707typedef __fsfilcnt_t fsfilcnt_t;
708typedef __blkcnt64_t blkcnt64_t;
709typedef __fsblkcnt64_t fsblkcnt64_t;
710typedef __fsfilcnt64_t fsfilcnt64_t;
712{
713 unsigned int __readers;
714 unsigned int __writers;
715 unsigned int __wrphase_futex;
716 unsigned int __writers_futex;
717 unsigned int __pad3;
718 unsigned int __pad4;
719 int __cur_writer;
720 int __shared;
721 signed char __rwelision;
722 unsigned char __pad1[7];
723 unsigned long int __pad2;
724 unsigned int __flags;
725};
726typedef struct __pthread_internal_list
727{
728 struct __pthread_internal_list *__prev;
729 struct __pthread_internal_list *__next;
732{
733 int __lock ;
734 unsigned int __count;
735 int __owner;
736 unsigned int __nusers;
737 int __kind;
738
739 short __spins; short __elision;
740 __pthread_list_t __list;
741
742};
743struct __pthread_cond_s
744{
745 __extension__ union
746 {
747 __extension__ unsigned long long int __wseq;
748 struct
749 {
750 unsigned int __low;
751 unsigned int __high;
752 } __wseq32;
753 };
754 __extension__ union
755 {
756 __extension__ unsigned long long int __g1_start;
757 struct
758 {
759 unsigned int __low;
760 unsigned int __high;
761 } __g1_start32;
762 };
763 unsigned int __g_refs[2] ;
764 unsigned int __g_size[2];
765 unsigned int __g1_orig_size;
766 unsigned int __wrefs;
767 unsigned int __g_signals[2];
768};
769typedef unsigned long int pthread_t;
770typedef union
771{
772 char __size[4];
773 int __align;
775typedef union
776{
777 char __size[4];
778 int __align;
780typedef unsigned int pthread_key_t;
781typedef int pthread_once_t;
782union pthread_attr_t
783{
784 char __size[56];
785 long int __align;
786};
787typedef union pthread_attr_t pthread_attr_t;
788typedef union
789{
790 struct __pthread_mutex_s __data;
791 char __size[40];
792 long int __align;
794typedef union
795{
796 struct __pthread_cond_s __data;
797 char __size[48];
798 __extension__ long long int __align;
800typedef union
801{
802 struct __pthread_rwlock_arch_t __data;
803 char __size[56];
804 long int __align;
806typedef union
807{
808 char __size[8];
809 long int __align;
811typedef volatile int pthread_spinlock_t;
812typedef union
813{
814 char __size[32];
815 long int __align;
817typedef union
818{
819 char __size[4];
820 int __align;
822
823
824struct stat
825 {
826 __dev_t st_dev;
827 __ino_t st_ino;
828 __nlink_t st_nlink;
829 __mode_t st_mode;
830 __uid_t st_uid;
831 __gid_t st_gid;
832 int __pad0;
833 __dev_t st_rdev;
834 __off_t st_size;
835 __blksize_t st_blksize;
836 __blkcnt_t st_blocks;
837 struct timespec st_atim;
838 struct timespec st_mtim;
839 struct timespec st_ctim;
840 __syscall_slong_t __glibc_reserved[3];
841 };
842struct stat64
843 {
844 __dev_t st_dev;
845 __ino64_t st_ino;
846 __nlink_t st_nlink;
847 __mode_t st_mode;
848 __uid_t st_uid;
849 __gid_t st_gid;
850 int __pad0;
851 __dev_t st_rdev;
852 __off_t st_size;
853 __blksize_t st_blksize;
854 __blkcnt64_t st_blocks;
855 struct timespec st_atim;
856 struct timespec st_mtim;
857 struct timespec st_ctim;
858 __syscall_slong_t __glibc_reserved[3];
859 };
860extern int stat (const char *__restrict __file,
861 struct stat *__restrict __buf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
862extern int fstat (int __fd, struct stat *__buf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
863extern int stat64 (const char *__restrict __file,
864 struct stat64 *__restrict __buf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
865extern int fstat64 (int __fd, struct stat64 *__buf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
866extern int fstatat (int __fd, const char *__restrict __file,
867 struct stat *__restrict __buf, int __flag)
868 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3)));
869extern int fstatat64 (int __fd, const char *__restrict __file,
870 struct stat64 *__restrict __buf, int __flag)
871 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3)));
872extern int lstat (const char *__restrict __file,
873 struct stat *__restrict __buf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
874extern int lstat64 (const char *__restrict __file,
875 struct stat64 *__restrict __buf)
876 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
877extern int chmod (const char *__file, __mode_t __mode)
878 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
879extern int lchmod (const char *__file, __mode_t __mode)
880 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
881extern int fchmod (int __fd, __mode_t __mode) __attribute__ ((__nothrow__ , __leaf__));
882extern int fchmodat (int __fd, const char *__file, __mode_t __mode,
883 int __flag)
884 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))) __attribute__ ((__warn_unused_result__));
885extern __mode_t umask (__mode_t __mask) __attribute__ ((__nothrow__ , __leaf__));
886extern __mode_t getumask (void) __attribute__ ((__nothrow__ , __leaf__));
887extern int mkdir (const char *__path, __mode_t __mode)
888 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
889extern int mkdirat (int __fd, const char *__path, __mode_t __mode)
890 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
891extern int mknod (const char *__path, __mode_t __mode, __dev_t __dev)
892 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
893extern int mknodat (int __fd, const char *__path, __mode_t __mode,
894 __dev_t __dev) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
895extern int mkfifo (const char *__path, __mode_t __mode)
896 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
897extern int mkfifoat (int __fd, const char *__path, __mode_t __mode)
898 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
899extern int utimensat (int __fd, const char *__path,
900 const struct timespec __times[2],
901 int __flags)
902 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
903extern int futimens (int __fd, const struct timespec __times[2]) __attribute__ ((__nothrow__ , __leaf__));
904extern int __fxstat (int __ver, int __fildes, struct stat *__stat_buf)
905 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3)));
906extern int __xstat (int __ver, const char *__filename,
907 struct stat *__stat_buf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3)));
908extern int __lxstat (int __ver, const char *__filename,
909 struct stat *__stat_buf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3)));
910extern int __fxstatat (int __ver, int __fildes, const char *__filename,
911 struct stat *__stat_buf, int __flag)
912 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4)));
913extern int __fxstat64 (int __ver, int __fildes, struct stat64 *__stat_buf)
914 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3)));
915extern int __xstat64 (int __ver, const char *__filename,
916 struct stat64 *__stat_buf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3)));
917extern int __lxstat64 (int __ver, const char *__filename,
918 struct stat64 *__stat_buf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3)));
919extern int __fxstatat64 (int __ver, int __fildes, const char *__filename,
920 struct stat64 *__stat_buf, int __flag)
921 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4)));
922extern int __xmknod (int __ver, const char *__path, __mode_t __mode,
923 __dev_t *__dev) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 4)));
924extern int __xmknodat (int __ver, int __fd, const char *__path,
925 __mode_t __mode, __dev_t *__dev)
926 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 5)));
927typedef __signed__ char __s8;
928typedef unsigned char __u8;
929typedef __signed__ short __s16;
930typedef unsigned short __u16;
931typedef __signed__ int __s32;
932typedef unsigned int __u32;
933__extension__ typedef __signed__ long long __s64;
934__extension__ typedef unsigned long long __u64;
935typedef struct {
936 unsigned long fds_bits[1024 / (8 * sizeof(long))];
938typedef void (*__kernel_sighandler_t)(int);
939typedef int __kernel_key_t;
940typedef int __kernel_mqd_t;
941typedef unsigned short __kernel_old_uid_t;
942typedef unsigned short __kernel_old_gid_t;
943typedef unsigned long __kernel_old_dev_t;
944typedef long __kernel_long_t;
945typedef unsigned long __kernel_ulong_t;
946typedef __kernel_ulong_t __kernel_ino_t;
947typedef unsigned int __kernel_mode_t;
948typedef int __kernel_pid_t;
949typedef int __kernel_ipc_pid_t;
950typedef unsigned int __kernel_uid_t;
951typedef unsigned int __kernel_gid_t;
952typedef __kernel_long_t __kernel_suseconds_t;
953typedef int __kernel_daddr_t;
954typedef unsigned int __kernel_uid32_t;
955typedef unsigned int __kernel_gid32_t;
956typedef __kernel_ulong_t __kernel_size_t;
957typedef __kernel_long_t __kernel_ssize_t;
958typedef __kernel_long_t __kernel_ptrdiff_t;
959typedef struct {
960 int val[2];
962typedef __kernel_long_t __kernel_off_t;
963typedef long long __kernel_loff_t;
964typedef __kernel_long_t __kernel_time_t;
965typedef long long __kernel_time64_t;
966typedef __kernel_long_t __kernel_clock_t;
967typedef int __kernel_timer_t;
968typedef int __kernel_clockid_t;
969typedef char * __kernel_caddr_t;
970typedef unsigned short __kernel_uid16_t;
971typedef unsigned short __kernel_gid16_t;
972typedef __u16 __le16;
973typedef __u16 __be16;
974typedef __u32 __le32;
975typedef __u32 __be32;
976typedef __u64 __le64;
977typedef __u64 __be64;
978typedef __u16 __sum16;
979typedef __u32 __wsum;
980typedef unsigned __poll_t;
981struct statx_timestamp {
982 __s64 tv_sec;
983 __u32 tv_nsec;
984 __s32 __reserved;
985};
986struct statx {
987 __u32 stx_mask;
988 __u32 stx_blksize;
989 __u64 stx_attributes;
990 __u32 stx_nlink;
991 __u32 stx_uid;
992 __u32 stx_gid;
993 __u16 stx_mode;
994 __u16 __spare0[1];
995 __u64 stx_ino;
996 __u64 stx_size;
997 __u64 stx_blocks;
998 __u64 stx_attributes_mask;
999 struct statx_timestamp stx_atime;
1000 struct statx_timestamp stx_btime;
1001 struct statx_timestamp stx_ctime;
1002 struct statx_timestamp stx_mtime;
1003 __u32 stx_rdev_major;
1004 __u32 stx_rdev_minor;
1005 __u32 stx_dev_major;
1006 __u32 stx_dev_minor;
1007 __u64 __spare2[14];
1008};
1009
1010int statx (int __dirfd, const char *__restrict __path, int __flags,
1011 unsigned int __mask, struct statx *__restrict __buf)
1012 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 5)));
1013
1014extern __inline __attribute__ ((__gnu_inline__)) int
1015__attribute__ ((__nothrow__ , __leaf__)) stat (const char *__path, struct stat *__statbuf)
1016{
1017 return __xstat (1, __path, __statbuf);
1018}
1019extern __inline __attribute__ ((__gnu_inline__)) int
1020__attribute__ ((__nothrow__ , __leaf__)) lstat (const char *__path, struct stat *__statbuf)
1021{
1022 return __lxstat (1, __path, __statbuf);
1023}
1024extern __inline __attribute__ ((__gnu_inline__)) int
1025__attribute__ ((__nothrow__ , __leaf__)) fstat (int __fd, struct stat *__statbuf)
1026{
1027 return __fxstat (1, __fd, __statbuf);
1028}
1029extern __inline __attribute__ ((__gnu_inline__)) int
1030__attribute__ ((__nothrow__ , __leaf__)) fstatat (int __fd, const char *__filename, struct stat *__statbuf, int __flag)
1031{
1032 return __fxstatat (1, __fd, __filename, __statbuf, __flag);
1033}
1034extern __inline __attribute__ ((__gnu_inline__)) int
1035__attribute__ ((__nothrow__ , __leaf__)) mknod (const char *__path, __mode_t __mode, __dev_t __dev)
1036{
1037 return __xmknod (0, __path, __mode, &__dev);
1038}
1039extern __inline __attribute__ ((__gnu_inline__)) int
1040__attribute__ ((__nothrow__ , __leaf__)) mknodat (int __fd, const char *__path, __mode_t __mode, __dev_t __dev)
1041{
1042 return __xmknodat (0, __fd, __path, __mode, &__dev);
1043}
1044extern __inline __attribute__ ((__gnu_inline__)) int
1045__attribute__ ((__nothrow__ , __leaf__)) stat64 (const char *__path, struct stat64 *__statbuf)
1046{
1047 return __xstat64 (1, __path, __statbuf);
1048}
1049extern __inline __attribute__ ((__gnu_inline__)) int
1050__attribute__ ((__nothrow__ , __leaf__)) lstat64 (const char *__path, struct stat64 *__statbuf)
1051{
1052 return __lxstat64 (1, __path, __statbuf);
1053}
1054extern __inline __attribute__ ((__gnu_inline__)) int
1055__attribute__ ((__nothrow__ , __leaf__)) fstat64 (int __fd, struct stat64 *__statbuf)
1056{
1057 return __fxstat64 (1, __fd, __statbuf);
1058}
1059extern __inline __attribute__ ((__gnu_inline__)) int
1060__attribute__ ((__nothrow__ , __leaf__)) fstatat64 (int __fd, const char *__filename, struct stat64 *__statbuf, int __flag)
1061{
1062 return __fxstatat64 (1, __fd, __filename, __statbuf, __flag);
1063}
1064
1065typedef int wchar_t;
1066
1067typedef struct
1068 {
1069 int quot;
1070 int rem;
1071 } div_t;
1072typedef struct
1073 {
1074 long int quot;
1075 long int rem;
1076 } ldiv_t;
1077__extension__ typedef struct
1078 {
1079 long long int quot;
1080 long long int rem;
1081 } lldiv_t;
1082extern size_t __ctype_get_mb_cur_max (void) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
1083extern double atof (const char *__nptr)
1084 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
1085extern int atoi (const char *__nptr)
1086 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
1087extern long int atol (const char *__nptr)
1088 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
1089__extension__ extern long long int atoll (const char *__nptr)
1090 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
1091extern double strtod (const char *__restrict __nptr,
1092 char **__restrict __endptr)
1093 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1094extern float strtof (const char *__restrict __nptr,
1095 char **__restrict __endptr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1096extern long double strtold (const char *__restrict __nptr,
1097 char **__restrict __endptr)
1098 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1099extern _Float32 strtof32 (const char *__restrict __nptr,
1100 char **__restrict __endptr)
1101 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1102extern _Float64 strtof64 (const char *__restrict __nptr,
1103 char **__restrict __endptr)
1104 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1105extern _Float128 strtof128 (const char *__restrict __nptr,
1106 char **__restrict __endptr)
1107 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1108extern _Float32x strtof32x (const char *__restrict __nptr,
1109 char **__restrict __endptr)
1110 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1111extern _Float64x strtof64x (const char *__restrict __nptr,
1112 char **__restrict __endptr)
1113 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1114extern long int strtol (const char *__restrict __nptr,
1115 char **__restrict __endptr, int __base)
1116 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1117extern unsigned long int strtoul (const char *__restrict __nptr,
1118 char **__restrict __endptr, int __base)
1119 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1120__extension__
1121extern long long int strtoq (const char *__restrict __nptr,
1122 char **__restrict __endptr, int __base)
1123 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1124__extension__
1125extern unsigned long long int strtouq (const char *__restrict __nptr,
1126 char **__restrict __endptr, int __base)
1127 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1128__extension__
1129extern long long int strtoll (const char *__restrict __nptr,
1130 char **__restrict __endptr, int __base)
1131 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1132__extension__
1133extern unsigned long long int strtoull (const char *__restrict __nptr,
1134 char **__restrict __endptr, int __base)
1135 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1136extern int strfromd (char *__dest, size_t __size, const char *__format,
1137 double __f)
1138 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3)));
1139extern int strfromf (char *__dest, size_t __size, const char *__format,
1140 float __f)
1141 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3)));
1142extern int strfroml (char *__dest, size_t __size, const char *__format,
1143 long double __f)
1144 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3)));
1145extern int strfromf32 (char *__dest, size_t __size, const char * __format,
1146 _Float32 __f)
1147 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3)));
1148extern int strfromf64 (char *__dest, size_t __size, const char * __format,
1149 _Float64 __f)
1150 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3)));
1151extern int strfromf128 (char *__dest, size_t __size, const char * __format,
1152 _Float128 __f)
1153 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3)));
1154extern int strfromf32x (char *__dest, size_t __size, const char * __format,
1155 _Float32x __f)
1156 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3)));
1157extern int strfromf64x (char *__dest, size_t __size, const char * __format,
1158 _Float64x __f)
1159 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3)));
1160struct __locale_struct
1161{
1162 struct __locale_data *__locales[13];
1163 const unsigned short int *__ctype_b;
1164 const int *__ctype_tolower;
1165 const int *__ctype_toupper;
1166 const char *__names[13];
1167};
1168typedef struct __locale_struct *__locale_t;
1169typedef __locale_t locale_t;
1170extern long int strtol_l (const char *__restrict __nptr,
1171 char **__restrict __endptr, int __base,
1172 locale_t __loc) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 4)));
1173extern unsigned long int strtoul_l (const char *__restrict __nptr,
1174 char **__restrict __endptr,
1175 int __base, locale_t __loc)
1176 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 4)));
1177__extension__
1178extern long long int strtoll_l (const char *__restrict __nptr,
1179 char **__restrict __endptr, int __base,
1180 locale_t __loc)
1181 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 4)));
1182__extension__
1183extern unsigned long long int strtoull_l (const char *__restrict __nptr,
1184 char **__restrict __endptr,
1185 int __base, locale_t __loc)
1186 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 4)));
1187extern double strtod_l (const char *__restrict __nptr,
1188 char **__restrict __endptr, locale_t __loc)
1189 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 3)));
1190extern float strtof_l (const char *__restrict __nptr,
1191 char **__restrict __endptr, locale_t __loc)
1192 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 3)));
1193extern long double strtold_l (const char *__restrict __nptr,
1194 char **__restrict __endptr,
1195 locale_t __loc)
1196 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 3)));
1197extern _Float32 strtof32_l (const char *__restrict __nptr,
1198 char **__restrict __endptr,
1199 locale_t __loc)
1200 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 3)));
1201extern _Float64 strtof64_l (const char *__restrict __nptr,
1202 char **__restrict __endptr,
1203 locale_t __loc)
1204 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 3)));
1205extern _Float128 strtof128_l (const char *__restrict __nptr,
1206 char **__restrict __endptr,
1207 locale_t __loc)
1208 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 3)));
1209extern _Float32x strtof32x_l (const char *__restrict __nptr,
1210 char **__restrict __endptr,
1211 locale_t __loc)
1212 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 3)));
1213extern _Float64x strtof64x_l (const char *__restrict __nptr,
1214 char **__restrict __endptr,
1215 locale_t __loc)
1216 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 3)));
1217extern __inline __attribute__ ((__gnu_inline__)) int
1218__attribute__ ((__nothrow__ , __leaf__)) atoi (const char *__nptr)
1219{
1220 return (int) strtol (__nptr, (char **) ((void *)0), 10);
1221}
1222extern __inline __attribute__ ((__gnu_inline__)) long int
1223__attribute__ ((__nothrow__ , __leaf__)) atol (const char *__nptr)
1224{
1225 return strtol (__nptr, (char **) ((void *)0), 10);
1226}
1227__extension__ extern __inline __attribute__ ((__gnu_inline__)) long long int
1228__attribute__ ((__nothrow__ , __leaf__)) atoll (const char *__nptr)
1229{
1230 return strtoll (__nptr, (char **) ((void *)0), 10);
1231}
1232extern char *l64a (long int __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
1233extern long int a64l (const char *__s)
1234 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
1235extern long int random (void) __attribute__ ((__nothrow__ , __leaf__));
1236extern void srandom (unsigned int __seed) __attribute__ ((__nothrow__ , __leaf__));
1237extern char *initstate (unsigned int __seed, char *__statebuf,
1238 size_t __statelen) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
1239extern char *setstate (char *__statebuf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1240struct random_data
1241 {
1242 int32_t *fptr;
1243 int32_t *rptr;
1244 int32_t *state;
1245 int rand_type;
1246 int rand_deg;
1247 int rand_sep;
1248 int32_t *end_ptr;
1249 };
1250extern int random_r (struct random_data *__restrict __buf,
1251 int32_t *__restrict __result) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1252extern int srandom_r (unsigned int __seed, struct random_data *__buf)
1253 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
1254extern int initstate_r (unsigned int __seed, char *__restrict __statebuf,
1255 size_t __statelen,
1256 struct random_data *__restrict __buf)
1257 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 4)));
1258extern int setstate_r (char *__restrict __statebuf,
1259 struct random_data *__restrict __buf)
1260 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1261extern int rand (void) __attribute__ ((__nothrow__ , __leaf__));
1262extern void srand (unsigned int __seed) __attribute__ ((__nothrow__ , __leaf__));
1263extern int rand_r (unsigned int *__seed) __attribute__ ((__nothrow__ , __leaf__));
1264extern double drand48 (void) __attribute__ ((__nothrow__ , __leaf__));
1265extern double erand48 (unsigned short int __xsubi[3]) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1266extern long int lrand48 (void) __attribute__ ((__nothrow__ , __leaf__));
1267extern long int nrand48 (unsigned short int __xsubi[3])
1268 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1269extern long int mrand48 (void) __attribute__ ((__nothrow__ , __leaf__));
1270extern long int jrand48 (unsigned short int __xsubi[3])
1271 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1272extern void srand48 (long int __seedval) __attribute__ ((__nothrow__ , __leaf__));
1273extern unsigned short int *seed48 (unsigned short int __seed16v[3])
1274 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1275extern void lcong48 (unsigned short int __param[7]) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1276struct drand48_data
1277 {
1278 unsigned short int __x[3];
1279 unsigned short int __old_x[3];
1280 unsigned short int __c;
1281 unsigned short int __init;
1282 __extension__ unsigned long long int __a;
1283 };
1284extern int drand48_r (struct drand48_data *__restrict __buffer,
1285 double *__restrict __result) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1286extern int erand48_r (unsigned short int __xsubi[3],
1287 struct drand48_data *__restrict __buffer,
1288 double *__restrict __result) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1289extern int lrand48_r (struct drand48_data *__restrict __buffer,
1290 long int *__restrict __result)
1291 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1292extern int nrand48_r (unsigned short int __xsubi[3],
1293 struct drand48_data *__restrict __buffer,
1294 long int *__restrict __result)
1295 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1296extern int mrand48_r (struct drand48_data *__restrict __buffer,
1297 long int *__restrict __result)
1298 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1299extern int jrand48_r (unsigned short int __xsubi[3],
1300 struct drand48_data *__restrict __buffer,
1301 long int *__restrict __result)
1302 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1303extern int srand48_r (long int __seedval, struct drand48_data *__buffer)
1304 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
1305extern int seed48_r (unsigned short int __seed16v[3],
1306 struct drand48_data *__buffer) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1307extern int lcong48_r (unsigned short int __param[7],
1308 struct drand48_data *__buffer)
1309 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1310extern void *malloc (size_t __size) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__))
1311 __attribute__ ((__alloc_size__ (1))) __attribute__ ((__warn_unused_result__));
1312extern void *calloc (size_t __nmemb, size_t __size)
1313 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) __attribute__ ((__alloc_size__ (1, 2))) __attribute__ ((__warn_unused_result__));
1314extern void *realloc (void *__ptr, size_t __size)
1315 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__)) __attribute__ ((__alloc_size__ (2)));
1316extern void *reallocarray (void *__ptr, size_t __nmemb, size_t __size)
1317 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__))
1318 __attribute__ ((__alloc_size__ (2, 3)));
1319extern void free (void *__ptr) __attribute__ ((__nothrow__ , __leaf__));
1320
1321extern void *alloca (size_t __size) __attribute__ ((__nothrow__ , __leaf__));
1322
1323extern void *valloc (size_t __size) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__))
1324 __attribute__ ((__alloc_size__ (1))) __attribute__ ((__warn_unused_result__));
1325extern int posix_memalign (void **__memptr, size_t __alignment, size_t __size)
1326 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
1327extern void *aligned_alloc (size_t __alignment, size_t __size)
1328 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) __attribute__ ((__alloc_size__ (2))) __attribute__ ((__warn_unused_result__));
1329extern void abort (void) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__));
1330extern int atexit (void (*__func) (void)) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1331extern int at_quick_exit (void (*__func) (void)) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1332extern int on_exit (void (*__func) (int __status, void *__arg), void *__arg)
1333 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1334extern void exit (int __status) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__));
1335extern void quick_exit (int __status) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__));
1336extern void _Exit (int __status) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__));
1337extern char *getenv (const char *__name) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
1338extern char *secure_getenv (const char *__name)
1339 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
1340extern int putenv (char *__string) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1341extern int setenv (const char *__name, const char *__value, int __replace)
1342 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
1343extern int unsetenv (const char *__name) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1344extern int clearenv (void) __attribute__ ((__nothrow__ , __leaf__));
1345extern char *mktemp (char *__template) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1346extern int mkstemp (char *__template) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
1347extern int mkstemp64 (char *__template) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
1348extern int mkstemps (char *__template, int __suffixlen) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
1349extern int mkstemps64 (char *__template, int __suffixlen)
1350 __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
1351extern char *mkdtemp (char *__template) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
1352extern int mkostemp (char *__template, int __flags) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
1353extern int mkostemp64 (char *__template, int __flags) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
1354extern int mkostemps (char *__template, int __suffixlen, int __flags)
1355 __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
1356extern int mkostemps64 (char *__template, int __suffixlen, int __flags)
1357 __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
1358extern int system (const char *__command) __attribute__ ((__warn_unused_result__));
1359extern char *canonicalize_file_name (const char *__name)
1360 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
1361extern char *realpath (const char *__restrict __name,
1362 char *__restrict __resolved) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
1363typedef int (*__compar_fn_t) (const void *, const void *);
1364typedef __compar_fn_t comparison_fn_t;
1365typedef int (*__compar_d_fn_t) (const void *, const void *, void *);
1366extern void *bsearch (const void *__key, const void *__base,
1367 size_t __nmemb, size_t __size, __compar_fn_t __compar)
1368 __attribute__ ((__nonnull__ (1, 2, 5))) __attribute__ ((__warn_unused_result__));
1369extern __inline __attribute__ ((__gnu_inline__)) void *
1370bsearch (const void *__key, const void *__base, size_t __nmemb, size_t __size,
1371 __compar_fn_t __compar)
1372{
1373 size_t __l, __u, __idx;
1374 const void *__p;
1375 int __comparison;
1376 __l = 0;
1377 __u = __nmemb;
1378 while (__l < __u)
1379 {
1380 __idx = (__l + __u) / 2;
1381 __p = (void *) (((const char *) __base) + (__idx * __size));
1382 __comparison = (*__compar) (__key, __p);
1383 if (__comparison < 0)
1384 __u = __idx;
1385 else if (__comparison > 0)
1386 __l = __idx + 1;
1387 else
1388 return (void *) __p;
1389 }
1390 return ((void *)0);
1391}
1392extern void qsort (void *__base, size_t __nmemb, size_t __size,
1393 __compar_fn_t __compar) __attribute__ ((__nonnull__ (1, 4)));
1394extern void qsort_r (void *__base, size_t __nmemb, size_t __size,
1395 __compar_d_fn_t __compar, void *__arg)
1396 __attribute__ ((__nonnull__ (1, 4)));
1397extern int abs (int __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__));
1398extern long int labs (long int __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__));
1399__extension__ extern long long int llabs (long long int __x)
1400 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__));
1401extern div_t div (int __numer, int __denom)
1402 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__));
1403extern ldiv_t ldiv (long int __numer, long int __denom)
1404 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__));
1405__extension__ extern lldiv_t lldiv (long long int __numer,
1406 long long int __denom)
1407 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__));
1408extern char *ecvt (double __value, int __ndigit, int *__restrict __decpt,
1409 int *__restrict __sign) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__));
1410extern char *fcvt (double __value, int __ndigit, int *__restrict __decpt,
1411 int *__restrict __sign) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__));
1412extern char *gcvt (double __value, int __ndigit, char *__buf)
1413 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3))) __attribute__ ((__warn_unused_result__));
1414extern char *qecvt (long double __value, int __ndigit,
1415 int *__restrict __decpt, int *__restrict __sign)
1416 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__));
1417extern char *qfcvt (long double __value, int __ndigit,
1418 int *__restrict __decpt, int *__restrict __sign)
1419 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__));
1420extern char *qgcvt (long double __value, int __ndigit, char *__buf)
1421 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3))) __attribute__ ((__warn_unused_result__));
1422extern int ecvt_r (double __value, int __ndigit, int *__restrict __decpt,
1423 int *__restrict __sign, char *__restrict __buf,
1424 size_t __len) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4, 5)));
1425extern int fcvt_r (double __value, int __ndigit, int *__restrict __decpt,
1426 int *__restrict __sign, char *__restrict __buf,
1427 size_t __len) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4, 5)));
1428extern int qecvt_r (long double __value, int __ndigit,
1429 int *__restrict __decpt, int *__restrict __sign,
1430 char *__restrict __buf, size_t __len)
1431 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4, 5)));
1432extern int qfcvt_r (long double __value, int __ndigit,
1433 int *__restrict __decpt, int *__restrict __sign,
1434 char *__restrict __buf, size_t __len)
1435 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4, 5)));
1436extern int mblen (const char *__s, size_t __n) __attribute__ ((__nothrow__ , __leaf__));
1437extern int mbtowc (wchar_t *__restrict __pwc,
1438 const char *__restrict __s, size_t __n) __attribute__ ((__nothrow__ , __leaf__));
1439extern int wctomb (char *__s, wchar_t __wchar) __attribute__ ((__nothrow__ , __leaf__));
1440extern size_t mbstowcs (wchar_t *__restrict __pwcs,
1441 const char *__restrict __s, size_t __n) __attribute__ ((__nothrow__ , __leaf__));
1442extern size_t wcstombs (char *__restrict __s,
1443 const wchar_t *__restrict __pwcs, size_t __n)
1444 __attribute__ ((__nothrow__ , __leaf__));
1445extern int rpmatch (const char *__response) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
1446extern int getsubopt (char **__restrict __optionp,
1447 char *const *__restrict __tokens,
1448 char **__restrict __valuep)
1449 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2, 3))) __attribute__ ((__warn_unused_result__));
1450extern int posix_openpt (int __oflag) __attribute__ ((__warn_unused_result__));
1451extern int grantpt (int __fd) __attribute__ ((__nothrow__ , __leaf__));
1452extern int unlockpt (int __fd) __attribute__ ((__nothrow__ , __leaf__));
1453extern char *ptsname (int __fd) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
1454extern int ptsname_r (int __fd, char *__buf, size_t __buflen)
1455 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
1456extern int getpt (void);
1457extern int getloadavg (double __loadavg[], int __nelem)
1458 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1459extern __inline __attribute__ ((__gnu_inline__)) double
1460__attribute__ ((__nothrow__ , __leaf__)) atof (const char *__nptr)
1461{
1462 return strtod (__nptr, (char **) ((void *)0));
1463}
1464extern char *__realpath_chk (const char *__restrict __name,
1465 char *__restrict __resolved,
1466 size_t __resolvedlen) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
1467extern char *__realpath_alias (const char *__restrict __name, char *__restrict __resolved) __asm__ ("" "realpath") __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
1468extern char *__realpath_chk_warn (const char *__restrict __name, char *__restrict __resolved, size_t __resolvedlen) __asm__ ("" "__realpath_chk") __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__))
1469 __attribute__((__warning__ ("second argument of realpath must be either NULL or at " "least PATH_MAX bytes long buffer")));
1470extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) char *
1471__attribute__ ((__nothrow__ , __leaf__)) realpath (const char *__restrict __name, char *__restrict __resolved)
1472{
1473 if (__builtin_object_size (__resolved, 2 > 1) != (size_t) -1)
1474 {
1475 return __realpath_chk (__name, __resolved, __builtin_object_size (__resolved, 2 > 1));
1476 }
1477 return __realpath_alias (__name, __resolved);
1478}
1479extern int __ptsname_r_chk (int __fd, char *__buf, size_t __buflen,
1480 size_t __nreal) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
1481extern int __ptsname_r_alias (int __fd, char *__buf, size_t __buflen) __asm__ ("" "ptsname_r") __attribute__ ((__nothrow__ , __leaf__))
1482 __attribute__ ((__nonnull__ (2)));
1483extern int __ptsname_r_chk_warn (int __fd, char *__buf, size_t __buflen, size_t __nreal) __asm__ ("" "__ptsname_r_chk") __attribute__ ((__nothrow__ , __leaf__))
1484 __attribute__ ((__nonnull__ (2))) __attribute__((__warning__ ("ptsname_r called with buflen bigger than " "size of buf")));
1485extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
1486__attribute__ ((__nothrow__ , __leaf__)) ptsname_r (int __fd, char *__buf, size_t __buflen)
1487{
1488 if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1)
1489 {
1490 if (!__builtin_constant_p (__buflen))
1491 return __ptsname_r_chk (__fd, __buf, __buflen, __builtin_object_size (__buf, 2 > 1));
1492 if (__buflen > __builtin_object_size (__buf, 2 > 1))
1493 return __ptsname_r_chk_warn (__fd, __buf, __buflen, __builtin_object_size (__buf, 2 > 1));
1494 }
1495 return __ptsname_r_alias (__fd, __buf, __buflen);
1496}
1497extern int __wctomb_chk (char *__s, wchar_t __wchar, size_t __buflen)
1498 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
1499extern int __wctomb_alias (char *__s, wchar_t __wchar) __asm__ ("" "wctomb") __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
1500extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) int
1501__attribute__ ((__nothrow__ , __leaf__)) wctomb (char *__s, wchar_t __wchar)
1502{
1503 if (__builtin_object_size (__s, 2 > 1) != (size_t) -1 && 16 > __builtin_object_size (__s, 2 > 1))
1504 return __wctomb_chk (__s, __wchar, __builtin_object_size (__s, 2 > 1));
1505 return __wctomb_alias (__s, __wchar);
1506}
1507extern size_t __mbstowcs_chk (wchar_t *__restrict __dst,
1508 const char *__restrict __src,
1509 size_t __len, size_t __dstlen) __attribute__ ((__nothrow__ , __leaf__));
1510extern size_t __mbstowcs_alias (wchar_t *__restrict __dst, const char *__restrict __src, size_t __len) __asm__ ("" "mbstowcs") __attribute__ ((__nothrow__ , __leaf__));
1511extern size_t __mbstowcs_chk_warn (wchar_t *__restrict __dst, const char *__restrict __src, size_t __len, size_t __dstlen) __asm__ ("" "__mbstowcs_chk") __attribute__ ((__nothrow__ , __leaf__))
1512 __attribute__((__warning__ ("mbstowcs called with dst buffer smaller than len " "* sizeof (wchar_t)")));
1513extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) size_t
1514__attribute__ ((__nothrow__ , __leaf__)) mbstowcs (wchar_t *__restrict __dst, const char *__restrict __src, size_t __len)
1515{
1516 if (__builtin_object_size (__dst, 2 > 1) != (size_t) -1)
1517 {
1518 if (!__builtin_constant_p (__len))
1519 return __mbstowcs_chk (__dst, __src, __len,
1520 __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t));
1521 if (__len > __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t))
1522 return __mbstowcs_chk_warn (__dst, __src, __len,
1523 __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t));
1524 }
1525 return __mbstowcs_alias (__dst, __src, __len);
1526}
1527extern size_t __wcstombs_chk (char *__restrict __dst,
1528 const wchar_t *__restrict __src,
1529 size_t __len, size_t __dstlen) __attribute__ ((__nothrow__ , __leaf__));
1530extern size_t __wcstombs_alias (char *__restrict __dst, const wchar_t *__restrict __src, size_t __len) __asm__ ("" "wcstombs") __attribute__ ((__nothrow__ , __leaf__));
1531extern size_t __wcstombs_chk_warn (char *__restrict __dst, const wchar_t *__restrict __src, size_t __len, size_t __dstlen) __asm__ ("" "__wcstombs_chk") __attribute__ ((__nothrow__ , __leaf__))
1532 __attribute__((__warning__ ("wcstombs called with dst buffer smaller than len")));
1533extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) size_t
1534__attribute__ ((__nothrow__ , __leaf__)) wcstombs (char *__restrict __dst, const wchar_t *__restrict __src, size_t __len)
1535{
1536 if (__builtin_object_size (__dst, 2 > 1) != (size_t) -1)
1537 {
1538 if (!__builtin_constant_p (__len))
1539 return __wcstombs_chk (__dst, __src, __len, __builtin_object_size (__dst, 2 > 1));
1540 if (__len > __builtin_object_size (__dst, 2 > 1))
1541 return __wcstombs_chk_warn (__dst, __src, __len, __builtin_object_size (__dst, 2 > 1));
1542 }
1543 return __wcstombs_alias (__dst, __src, __len);
1544}
1545
1546typedef long int ptrdiff_t;
1547
1548extern void *memcpy (void *__restrict __dest, const void *__restrict __src,
1549 size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1550extern void *memmove (void *__dest, const void *__src, size_t __n)
1551 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1552extern void *memccpy (void *__restrict __dest, const void *__restrict __src,
1553 int __c, size_t __n)
1554 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1555extern void *memset (void *__s, int __c, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1556extern int memcmp (const void *__s1, const void *__s2, size_t __n)
1557 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1558extern void *memchr (const void *__s, int __c, size_t __n)
1559 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
1560extern void *rawmemchr (const void *__s, int __c)
1561 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
1562extern void *memrchr (const void *__s, int __c, size_t __n)
1563 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
1564extern char *strcpy (char *__restrict __dest, const char *__restrict __src)
1565 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1566extern char *strncpy (char *__restrict __dest,
1567 const char *__restrict __src, size_t __n)
1568 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1569extern char *strcat (char *__restrict __dest, const char *__restrict __src)
1570 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1571extern char *strncat (char *__restrict __dest, const char *__restrict __src,
1572 size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1573extern int strcmp (const char *__s1, const char *__s2)
1574 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1575extern int strncmp (const char *__s1, const char *__s2, size_t __n)
1576 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1577extern int strcoll (const char *__s1, const char *__s2)
1578 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1579extern size_t strxfrm (char *__restrict __dest,
1580 const char *__restrict __src, size_t __n)
1581 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
1582extern int strcoll_l (const char *__s1, const char *__s2, locale_t __l)
1583 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3)));
1584extern size_t strxfrm_l (char *__dest, const char *__src, size_t __n,
1585 locale_t __l) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 4)));
1586extern char *strdup (const char *__s)
1587 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1)));
1588extern char *strndup (const char *__string, size_t __n)
1589 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1)));
1590extern char *strchr (const char *__s, int __c)
1591 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
1592extern char *strrchr (const char *__s, int __c)
1593 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
1594extern char *strchrnul (const char *__s, int __c)
1595 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
1596extern size_t strcspn (const char *__s, const char *__reject)
1597 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1598extern size_t strspn (const char *__s, const char *__accept)
1599 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1600extern char *strpbrk (const char *__s, const char *__accept)
1601 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1602extern char *strstr (const char *__haystack, const char *__needle)
1603 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1604extern char *strtok (char *__restrict __s, const char *__restrict __delim)
1605 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
1606extern char *__strtok_r (char *__restrict __s,
1607 const char *__restrict __delim,
1608 char **__restrict __save_ptr)
1609 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3)));
1610extern char *strtok_r (char *__restrict __s, const char *__restrict __delim,
1611 char **__restrict __save_ptr)
1612 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3)));
1613extern char *strcasestr (const char *__haystack, const char *__needle)
1614 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1615extern void *memmem (const void *__haystack, size_t __haystacklen,
1616 const void *__needle, size_t __needlelen)
1617 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 3)));
1618extern void *__mempcpy (void *__restrict __dest,
1619 const void *__restrict __src, size_t __n)
1620 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1621extern void *mempcpy (void *__restrict __dest,
1622 const void *__restrict __src, size_t __n)
1623 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1624extern size_t strlen (const char *__s)
1625 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
1626extern size_t strnlen (const char *__string, size_t __maxlen)
1627 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
1628extern char *strerror (int __errnum) __attribute__ ((__nothrow__ , __leaf__));
1629extern char *strerror_r (int __errnum, char *__buf, size_t __buflen)
1630 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))) __attribute__ ((__warn_unused_result__));
1631extern char *strerror_l (int __errnum, locale_t __l) __attribute__ ((__nothrow__ , __leaf__));
1632
1633extern int bcmp (const void *__s1, const void *__s2, size_t __n)
1634 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1635extern void bcopy (const void *__src, void *__dest, size_t __n)
1636 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1637extern void bzero (void *__s, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1638extern char *index (const char *__s, int __c)
1639 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
1640extern char *rindex (const char *__s, int __c)
1641 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
1642extern int ffs (int __i) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
1643extern int ffsl (long int __l) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
1644__extension__ extern int ffsll (long long int __ll)
1645 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
1646extern int strcasecmp (const char *__s1, const char *__s2)
1647 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1648extern int strncasecmp (const char *__s1, const char *__s2, size_t __n)
1649 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1650extern int strcasecmp_l (const char *__s1, const char *__s2, locale_t __loc)
1651 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3)));
1652extern int strncasecmp_l (const char *__s1, const char *__s2,
1653 size_t __n, locale_t __loc)
1654 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 4)));
1655
1656extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) void
1657__attribute__ ((__nothrow__ , __leaf__)) bcopy (const void *__src, void *__dest, size_t __len)
1658{
1659 (void) __builtin___memmove_chk (__dest, __src, __len, __builtin_object_size (__dest, 0));
1660}
1661extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) void
1662__attribute__ ((__nothrow__ , __leaf__)) bzero (void *__dest, size_t __len)
1663{
1664 (void) __builtin___memset_chk (__dest, '\0', __len, __builtin_object_size (__dest, 0));
1665}
1666extern void explicit_bzero (void *__s, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1667extern char *strsep (char **__restrict __stringp,
1668 const char *__restrict __delim)
1669 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1670extern char *strsignal (int __sig) __attribute__ ((__nothrow__ , __leaf__));
1671extern char *__stpcpy (char *__restrict __dest, const char *__restrict __src)
1672 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1673extern char *stpcpy (char *__restrict __dest, const char *__restrict __src)
1674 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1675extern char *__stpncpy (char *__restrict __dest,
1676 const char *__restrict __src, size_t __n)
1677 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1678extern char *stpncpy (char *__restrict __dest,
1679 const char *__restrict __src, size_t __n)
1680 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1681extern int strverscmp (const char *__s1, const char *__s2)
1682 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
1683extern char *strfry (char *__string) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1684extern void *memfrob (void *__s, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1685extern char *basename (const char *__filename) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1686extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) void *
1687__attribute__ ((__nothrow__ , __leaf__)) memcpy (void *__restrict __dest, const void *__restrict __src, size_t __len)
1688{
1689 return __builtin___memcpy_chk (__dest, __src, __len, __builtin_object_size (__dest, 0));
1690}
1691extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) void *
1692__attribute__ ((__nothrow__ , __leaf__)) memmove (void *__dest, const void *__src, size_t __len)
1693{
1694 return __builtin___memmove_chk (__dest, __src, __len, __builtin_object_size (__dest, 0));
1695}
1696extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) void *
1697__attribute__ ((__nothrow__ , __leaf__)) mempcpy (void *__restrict __dest, const void *__restrict __src, size_t __len)
1698{
1699 return __builtin___mempcpy_chk (__dest, __src, __len, __builtin_object_size (__dest, 0));
1700}
1701extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) void *
1702__attribute__ ((__nothrow__ , __leaf__)) memset (void *__dest, int __ch, size_t __len)
1703{
1704 return __builtin___memset_chk (__dest, __ch, __len, __builtin_object_size (__dest, 0));
1705}
1706void __explicit_bzero_chk (void *__dest, size_t __len, size_t __destlen)
1707 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1708extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) void
1709__attribute__ ((__nothrow__ , __leaf__)) explicit_bzero (void *__dest, size_t __len)
1710{
1711 __explicit_bzero_chk (__dest, __len, __builtin_object_size (__dest, 0));
1712}
1713extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) char *
1714__attribute__ ((__nothrow__ , __leaf__)) strcpy (char *__restrict __dest, const char *__restrict __src)
1715{
1716 return __builtin___strcpy_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1));
1717}
1718extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) char *
1719__attribute__ ((__nothrow__ , __leaf__)) stpcpy (char *__restrict __dest, const char *__restrict __src)
1720{
1721 return __builtin___stpcpy_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1));
1722}
1723extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) char *
1724__attribute__ ((__nothrow__ , __leaf__)) strncpy (char *__restrict __dest, const char *__restrict __src, size_t __len)
1725{
1726 return __builtin___strncpy_chk (__dest, __src, __len, __builtin_object_size (__dest, 2 > 1));
1727}
1728extern char *__stpncpy_chk (char *__dest, const char *__src, size_t __n,
1729 size_t __destlen) __attribute__ ((__nothrow__ , __leaf__));
1730extern char *__stpncpy_alias (char *__dest, const char *__src, size_t __n) __asm__ ("" "stpncpy") __attribute__ ((__nothrow__ , __leaf__));
1731extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) char *
1732__attribute__ ((__nothrow__ , __leaf__)) stpncpy (char *__dest, const char *__src, size_t __n)
1733{
1734 if (__builtin_object_size (__dest, 2 > 1) != (size_t) -1
1735 && (!__builtin_constant_p (__n) || __n > __builtin_object_size (__dest, 2 > 1)))
1736 return __stpncpy_chk (__dest, __src, __n, __builtin_object_size (__dest, 2 > 1));
1737 return __stpncpy_alias (__dest, __src, __n);
1738}
1739extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) char *
1740__attribute__ ((__nothrow__ , __leaf__)) strcat (char *__restrict __dest, const char *__restrict __src)
1741{
1742 return __builtin___strcat_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1));
1743}
1744extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) char *
1745__attribute__ ((__nothrow__ , __leaf__)) strncat (char *__restrict __dest, const char *__restrict __src, size_t __len)
1746{
1747 return __builtin___strncat_chk (__dest, __src, __len, __builtin_object_size (__dest, 2 > 1));
1748}
1749
1750typedef __uint8_t uint8_t;
1751typedef __uint16_t uint16_t;
1752typedef __uint32_t uint32_t;
1753typedef __uint64_t uint64_t;
1754typedef __int_least8_t int_least8_t;
1755typedef __int_least16_t int_least16_t;
1756typedef __int_least32_t int_least32_t;
1757typedef __int_least64_t int_least64_t;
1758typedef __uint_least8_t uint_least8_t;
1759typedef __uint_least16_t uint_least16_t;
1760typedef __uint_least32_t uint_least32_t;
1761typedef __uint_least64_t uint_least64_t;
1762typedef signed char int_fast8_t;
1763typedef long int int_fast16_t;
1764typedef long int int_fast32_t;
1765typedef long int int_fast64_t;
1766typedef unsigned char uint_fast8_t;
1767typedef unsigned long int uint_fast16_t;
1768typedef unsigned long int uint_fast32_t;
1769typedef unsigned long int uint_fast64_t;
1770typedef long int intptr_t;
1771typedef unsigned long int uintptr_t;
1772typedef __intmax_t intmax_t;
1773typedef __uintmax_t uintmax_t;
1774typedef int __gwchar_t;
1775
1776typedef struct
1777 {
1778 long int quot;
1779 long int rem;
1780 } imaxdiv_t;
1781extern intmax_t imaxabs (intmax_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
1782extern imaxdiv_t imaxdiv (intmax_t __numer, intmax_t __denom)
1783 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
1784extern intmax_t strtoimax (const char *__restrict __nptr,
1785 char **__restrict __endptr, int __base) __attribute__ ((__nothrow__ , __leaf__));
1786extern uintmax_t strtoumax (const char *__restrict __nptr,
1787 char ** __restrict __endptr, int __base) __attribute__ ((__nothrow__ , __leaf__));
1788extern intmax_t wcstoimax (const __gwchar_t *__restrict __nptr,
1789 __gwchar_t **__restrict __endptr, int __base)
1790 __attribute__ ((__nothrow__ , __leaf__));
1791extern uintmax_t wcstoumax (const __gwchar_t *__restrict __nptr,
1792 __gwchar_t ** __restrict __endptr, int __base)
1793 __attribute__ ((__nothrow__ , __leaf__));
1794extern long int __strtol_internal (const char *__restrict __nptr,
1795 char **__restrict __endptr,
1796 int __base, int __group)
1797 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
1798extern __inline __attribute__ ((__gnu_inline__)) intmax_t
1799__attribute__ ((__nothrow__ , __leaf__)) strtoimax (const char *__restrict nptr, char **__restrict endptr, int base)
1800{
1801 return __strtol_internal (nptr, endptr, base, 0);
1802}
1803extern unsigned long int __strtoul_internal (const char *__restrict __nptr,
1804 char ** __restrict __endptr,
1805 int __base, int __group)
1806 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
1807extern __inline __attribute__ ((__gnu_inline__)) uintmax_t
1808__attribute__ ((__nothrow__ , __leaf__)) strtoumax (const char *__restrict nptr, char **__restrict endptr, int base)
1809{
1810 return __strtoul_internal (nptr, endptr, base, 0);
1811}
1812extern long int __wcstol_internal (const __gwchar_t * __restrict __nptr,
1813 __gwchar_t **__restrict __endptr,
1814 int __base, int __group)
1815 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
1816extern __inline __attribute__ ((__gnu_inline__)) intmax_t
1817__attribute__ ((__nothrow__ , __leaf__)) wcstoimax (const __gwchar_t *__restrict nptr, __gwchar_t **__restrict endptr, int base)
1818{
1819 return __wcstol_internal (nptr, endptr, base, 0);
1820}
1821extern unsigned long int __wcstoul_internal (const __gwchar_t *
1822 __restrict __nptr,
1823 __gwchar_t **
1824 __restrict __endptr,
1825 int __base, int __group)
1826 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
1827extern __inline __attribute__ ((__gnu_inline__)) uintmax_t
1828__attribute__ ((__nothrow__ , __leaf__)) wcstoumax (const __gwchar_t *__restrict nptr, __gwchar_t **__restrict endptr, int base)
1829{
1830 return __wcstoul_internal (nptr, endptr, base, 0);
1831}
1832
1833
1834typedef __socklen_t socklen_t;
1835extern int access (const char *__name, int __type) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1836extern int euidaccess (const char *__name, int __type)
1837 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1838extern int eaccess (const char *__name, int __type)
1839 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
1840extern int faccessat (int __fd, const char *__file, int __type, int __flag)
1841 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))) __attribute__ ((__warn_unused_result__));
1842extern __off_t lseek (int __fd, __off_t __offset, int __whence) __attribute__ ((__nothrow__ , __leaf__));
1843extern __off64_t lseek64 (int __fd, __off64_t __offset, int __whence)
1844 __attribute__ ((__nothrow__ , __leaf__));
1845extern int close (int __fd);
1846extern ssize_t read (int __fd, void *__buf, size_t __nbytes) __attribute__ ((__warn_unused_result__));
1847extern ssize_t write (int __fd, const void *__buf, size_t __n) __attribute__ ((__warn_unused_result__));
1848extern ssize_t pread (int __fd, void *__buf, size_t __nbytes,
1849 __off_t __offset) __attribute__ ((__warn_unused_result__));
1850extern ssize_t pwrite (int __fd, const void *__buf, size_t __n,
1851 __off_t __offset) __attribute__ ((__warn_unused_result__));
1852extern ssize_t pread64 (int __fd, void *__buf, size_t __nbytes,
1853 __off64_t __offset) __attribute__ ((__warn_unused_result__));
1854extern ssize_t pwrite64 (int __fd, const void *__buf, size_t __n,
1855 __off64_t __offset) __attribute__ ((__warn_unused_result__));
1856extern int pipe (int __pipedes[2]) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
1857extern int pipe2 (int __pipedes[2], int __flags) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
1858extern unsigned int alarm (unsigned int __seconds) __attribute__ ((__nothrow__ , __leaf__));
1859extern unsigned int sleep (unsigned int __seconds);
1860extern __useconds_t ualarm (__useconds_t __value, __useconds_t __interval)
1861 __attribute__ ((__nothrow__ , __leaf__));
1862extern int usleep (__useconds_t __useconds);
1863extern int pause (void);
1864extern int chown (const char *__file, __uid_t __owner, __gid_t __group)
1865 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
1866extern int fchown (int __fd, __uid_t __owner, __gid_t __group) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
1867extern int lchown (const char *__file, __uid_t __owner, __gid_t __group)
1868 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
1869extern int fchownat (int __fd, const char *__file, __uid_t __owner,
1870 __gid_t __group, int __flag)
1871 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))) __attribute__ ((__warn_unused_result__));
1872extern int chdir (const char *__path) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
1873extern int fchdir (int __fd) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
1874extern char *getcwd (char *__buf, size_t __size) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
1875extern char *get_current_dir_name (void) __attribute__ ((__nothrow__ , __leaf__));
1876extern char *getwd (char *__buf)
1877 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__)) __attribute__ ((__warn_unused_result__));
1878extern int dup (int __fd) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
1879extern int dup2 (int __fd, int __fd2) __attribute__ ((__nothrow__ , __leaf__));
1880extern int dup3 (int __fd, int __fd2, int __flags) __attribute__ ((__nothrow__ , __leaf__));
1881extern char **__environ;
1882extern char **environ;
1883extern int execve (const char *__path, char *const __argv[],
1884 char *const __envp[]) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1885extern int fexecve (int __fd, char *const __argv[], char *const __envp[])
1886 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
1887extern int execv (const char *__path, char *const __argv[])
1888 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1889extern int execle (const char *__path, const char *__arg, ...)
1890 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1891extern int execl (const char *__path, const char *__arg, ...)
1892 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1893extern int execvp (const char *__file, char *const __argv[])
1894 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1895extern int execlp (const char *__file, const char *__arg, ...)
1896 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1897extern int execvpe (const char *__file, char *const __argv[],
1898 char *const __envp[])
1899 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
1900extern int nice (int __inc) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
1901extern void _exit (int __status) __attribute__ ((__noreturn__));
1902enum
1903 {
1904 _PC_LINK_MAX,
1905 _PC_MAX_CANON,
1906 _PC_MAX_INPUT,
1907 _PC_NAME_MAX,
1908 _PC_PATH_MAX,
1909 _PC_PIPE_BUF,
1910 _PC_CHOWN_RESTRICTED,
1911 _PC_NO_TRUNC,
1912 _PC_VDISABLE,
1913 _PC_SYNC_IO,
1914 _PC_ASYNC_IO,
1915 _PC_PRIO_IO,
1916 _PC_SOCK_MAXBUF,
1917 _PC_FILESIZEBITS,
1918 _PC_REC_INCR_XFER_SIZE,
1919 _PC_REC_MAX_XFER_SIZE,
1920 _PC_REC_MIN_XFER_SIZE,
1921 _PC_REC_XFER_ALIGN,
1922 _PC_ALLOC_SIZE_MIN,
1923 _PC_SYMLINK_MAX,
1924 _PC_2_SYMLINKS
1925 };
1926enum
1927 {
1928 _SC_ARG_MAX,
1929 _SC_CHILD_MAX,
1930 _SC_CLK_TCK,
1931 _SC_NGROUPS_MAX,
1932 _SC_OPEN_MAX,
1933 _SC_STREAM_MAX,
1934 _SC_TZNAME_MAX,
1935 _SC_JOB_CONTROL,
1936 _SC_SAVED_IDS,
1937 _SC_REALTIME_SIGNALS,
1938 _SC_PRIORITY_SCHEDULING,
1939 _SC_TIMERS,
1940 _SC_ASYNCHRONOUS_IO,
1941 _SC_PRIORITIZED_IO,
1942 _SC_SYNCHRONIZED_IO,
1943 _SC_FSYNC,
1944 _SC_MAPPED_FILES,
1945 _SC_MEMLOCK,
1946 _SC_MEMLOCK_RANGE,
1947 _SC_MEMORY_PROTECTION,
1948 _SC_MESSAGE_PASSING,
1949 _SC_SEMAPHORES,
1950 _SC_SHARED_MEMORY_OBJECTS,
1951 _SC_AIO_LISTIO_MAX,
1952 _SC_AIO_MAX,
1953 _SC_AIO_PRIO_DELTA_MAX,
1954 _SC_DELAYTIMER_MAX,
1955 _SC_MQ_OPEN_MAX,
1956 _SC_MQ_PRIO_MAX,
1957 _SC_VERSION,
1958 _SC_PAGESIZE,
1959 _SC_RTSIG_MAX,
1960 _SC_SEM_NSEMS_MAX,
1961 _SC_SEM_VALUE_MAX,
1962 _SC_SIGQUEUE_MAX,
1963 _SC_TIMER_MAX,
1964 _SC_BC_BASE_MAX,
1965 _SC_BC_DIM_MAX,
1966 _SC_BC_SCALE_MAX,
1967 _SC_BC_STRING_MAX,
1968 _SC_COLL_WEIGHTS_MAX,
1969 _SC_EQUIV_CLASS_MAX,
1970 _SC_EXPR_NEST_MAX,
1971 _SC_LINE_MAX,
1972 _SC_RE_DUP_MAX,
1973 _SC_CHARCLASS_NAME_MAX,
1974 _SC_2_VERSION,
1975 _SC_2_C_BIND,
1976 _SC_2_C_DEV,
1977 _SC_2_FORT_DEV,
1978 _SC_2_FORT_RUN,
1979 _SC_2_SW_DEV,
1980 _SC_2_LOCALEDEF,
1981 _SC_PII,
1982 _SC_PII_XTI,
1983 _SC_PII_SOCKET,
1984 _SC_PII_INTERNET,
1985 _SC_PII_OSI,
1986 _SC_POLL,
1987 _SC_SELECT,
1988 _SC_UIO_MAXIOV,
1989 _SC_IOV_MAX = _SC_UIO_MAXIOV,
1990 _SC_PII_INTERNET_STREAM,
1991 _SC_PII_INTERNET_DGRAM,
1992 _SC_PII_OSI_COTS,
1993 _SC_PII_OSI_CLTS,
1994 _SC_PII_OSI_M,
1995 _SC_T_IOV_MAX,
1996 _SC_THREADS,
1997 _SC_THREAD_SAFE_FUNCTIONS,
1998 _SC_GETGR_R_SIZE_MAX,
1999 _SC_GETPW_R_SIZE_MAX,
2000 _SC_LOGIN_NAME_MAX,
2001 _SC_TTY_NAME_MAX,
2002 _SC_THREAD_DESTRUCTOR_ITERATIONS,
2003 _SC_THREAD_KEYS_MAX,
2004 _SC_THREAD_STACK_MIN,
2005 _SC_THREAD_THREADS_MAX,
2006 _SC_THREAD_ATTR_STACKADDR,
2007 _SC_THREAD_ATTR_STACKSIZE,
2008 _SC_THREAD_PRIORITY_SCHEDULING,
2009 _SC_THREAD_PRIO_INHERIT,
2010 _SC_THREAD_PRIO_PROTECT,
2011 _SC_THREAD_PROCESS_SHARED,
2012 _SC_NPROCESSORS_CONF,
2013 _SC_NPROCESSORS_ONLN,
2014 _SC_PHYS_PAGES,
2015 _SC_AVPHYS_PAGES,
2016 _SC_ATEXIT_MAX,
2017 _SC_PASS_MAX,
2018 _SC_XOPEN_VERSION,
2019 _SC_XOPEN_XCU_VERSION,
2020 _SC_XOPEN_UNIX,
2021 _SC_XOPEN_CRYPT,
2022 _SC_XOPEN_ENH_I18N,
2023 _SC_XOPEN_SHM,
2024 _SC_2_CHAR_TERM,
2025 _SC_2_C_VERSION,
2026 _SC_2_UPE,
2027 _SC_XOPEN_XPG2,
2028 _SC_XOPEN_XPG3,
2029 _SC_XOPEN_XPG4,
2030 _SC_CHAR_BIT,
2031 _SC_CHAR_MAX,
2032 _SC_CHAR_MIN,
2033 _SC_INT_MAX,
2034 _SC_INT_MIN,
2035 _SC_LONG_BIT,
2036 _SC_WORD_BIT,
2037 _SC_MB_LEN_MAX,
2038 _SC_NZERO,
2039 _SC_SSIZE_MAX,
2040 _SC_SCHAR_MAX,
2041 _SC_SCHAR_MIN,
2042 _SC_SHRT_MAX,
2043 _SC_SHRT_MIN,
2044 _SC_UCHAR_MAX,
2045 _SC_UINT_MAX,
2046 _SC_ULONG_MAX,
2047 _SC_USHRT_MAX,
2048 _SC_NL_ARGMAX,
2049 _SC_NL_LANGMAX,
2050 _SC_NL_MSGMAX,
2051 _SC_NL_NMAX,
2052 _SC_NL_SETMAX,
2053 _SC_NL_TEXTMAX,
2054 _SC_XBS5_ILP32_OFF32,
2055 _SC_XBS5_ILP32_OFFBIG,
2056 _SC_XBS5_LP64_OFF64,
2057 _SC_XBS5_LPBIG_OFFBIG,
2058 _SC_XOPEN_LEGACY,
2059 _SC_XOPEN_REALTIME,
2060 _SC_XOPEN_REALTIME_THREADS,
2061 _SC_ADVISORY_INFO,
2062 _SC_BARRIERS,
2063 _SC_BASE,
2064 _SC_C_LANG_SUPPORT,
2065 _SC_C_LANG_SUPPORT_R,
2066 _SC_CLOCK_SELECTION,
2067 _SC_CPUTIME,
2068 _SC_THREAD_CPUTIME,
2069 _SC_DEVICE_IO,
2070 _SC_DEVICE_SPECIFIC,
2071 _SC_DEVICE_SPECIFIC_R,
2072 _SC_FD_MGMT,
2073 _SC_FIFO,
2074 _SC_PIPE,
2075 _SC_FILE_ATTRIBUTES,
2076 _SC_FILE_LOCKING,
2077 _SC_FILE_SYSTEM,
2078 _SC_MONOTONIC_CLOCK,
2079 _SC_MULTI_PROCESS,
2080 _SC_SINGLE_PROCESS,
2081 _SC_NETWORKING,
2082 _SC_READER_WRITER_LOCKS,
2083 _SC_SPIN_LOCKS,
2084 _SC_REGEXP,
2085 _SC_REGEX_VERSION,
2086 _SC_SHELL,
2087 _SC_SIGNALS,
2088 _SC_SPAWN,
2089 _SC_SPORADIC_SERVER,
2090 _SC_THREAD_SPORADIC_SERVER,
2091 _SC_SYSTEM_DATABASE,
2092 _SC_SYSTEM_DATABASE_R,
2093 _SC_TIMEOUTS,
2094 _SC_TYPED_MEMORY_OBJECTS,
2095 _SC_USER_GROUPS,
2096 _SC_USER_GROUPS_R,
2097 _SC_2_PBS,
2098 _SC_2_PBS_ACCOUNTING,
2099 _SC_2_PBS_LOCATE,
2100 _SC_2_PBS_MESSAGE,
2101 _SC_2_PBS_TRACK,
2102 _SC_SYMLOOP_MAX,
2103 _SC_STREAMS,
2104 _SC_2_PBS_CHECKPOINT,
2105 _SC_V6_ILP32_OFF32,
2106 _SC_V6_ILP32_OFFBIG,
2107 _SC_V6_LP64_OFF64,
2108 _SC_V6_LPBIG_OFFBIG,
2109 _SC_HOST_NAME_MAX,
2110 _SC_TRACE,
2111 _SC_TRACE_EVENT_FILTER,
2112 _SC_TRACE_INHERIT,
2113 _SC_TRACE_LOG,
2114 _SC_LEVEL1_ICACHE_SIZE,
2115 _SC_LEVEL1_ICACHE_ASSOC,
2116 _SC_LEVEL1_ICACHE_LINESIZE,
2117 _SC_LEVEL1_DCACHE_SIZE,
2118 _SC_LEVEL1_DCACHE_ASSOC,
2119 _SC_LEVEL1_DCACHE_LINESIZE,
2120 _SC_LEVEL2_CACHE_SIZE,
2121 _SC_LEVEL2_CACHE_ASSOC,
2122 _SC_LEVEL2_CACHE_LINESIZE,
2123 _SC_LEVEL3_CACHE_SIZE,
2124 _SC_LEVEL3_CACHE_ASSOC,
2125 _SC_LEVEL3_CACHE_LINESIZE,
2126 _SC_LEVEL4_CACHE_SIZE,
2127 _SC_LEVEL4_CACHE_ASSOC,
2128 _SC_LEVEL4_CACHE_LINESIZE,
2129 _SC_IPV6 = _SC_LEVEL1_ICACHE_SIZE + 50,
2130 _SC_RAW_SOCKETS,
2131 _SC_V7_ILP32_OFF32,
2132 _SC_V7_ILP32_OFFBIG,
2133 _SC_V7_LP64_OFF64,
2134 _SC_V7_LPBIG_OFFBIG,
2135 _SC_SS_REPL_MAX,
2136 _SC_TRACE_EVENT_NAME_MAX,
2137 _SC_TRACE_NAME_MAX,
2138 _SC_TRACE_SYS_MAX,
2139 _SC_TRACE_USER_EVENT_MAX,
2140 _SC_XOPEN_STREAMS,
2141 _SC_THREAD_ROBUST_PRIO_INHERIT,
2142 _SC_THREAD_ROBUST_PRIO_PROTECT
2143 };
2144enum
2145 {
2146 _CS_PATH,
2147 _CS_V6_WIDTH_RESTRICTED_ENVS,
2148 _CS_GNU_LIBC_VERSION,
2149 _CS_GNU_LIBPTHREAD_VERSION,
2150 _CS_V5_WIDTH_RESTRICTED_ENVS,
2151 _CS_V7_WIDTH_RESTRICTED_ENVS,
2152 _CS_LFS_CFLAGS = 1000,
2153 _CS_LFS_LDFLAGS,
2154 _CS_LFS_LIBS,
2155 _CS_LFS_LINTFLAGS,
2156 _CS_LFS64_CFLAGS,
2157 _CS_LFS64_LDFLAGS,
2158 _CS_LFS64_LIBS,
2159 _CS_LFS64_LINTFLAGS,
2160 _CS_XBS5_ILP32_OFF32_CFLAGS = 1100,
2161 _CS_XBS5_ILP32_OFF32_LDFLAGS,
2162 _CS_XBS5_ILP32_OFF32_LIBS,
2163 _CS_XBS5_ILP32_OFF32_LINTFLAGS,
2164 _CS_XBS5_ILP32_OFFBIG_CFLAGS,
2165 _CS_XBS5_ILP32_OFFBIG_LDFLAGS,
2166 _CS_XBS5_ILP32_OFFBIG_LIBS,
2167 _CS_XBS5_ILP32_OFFBIG_LINTFLAGS,
2168 _CS_XBS5_LP64_OFF64_CFLAGS,
2169 _CS_XBS5_LP64_OFF64_LDFLAGS,
2170 _CS_XBS5_LP64_OFF64_LIBS,
2171 _CS_XBS5_LP64_OFF64_LINTFLAGS,
2172 _CS_XBS5_LPBIG_OFFBIG_CFLAGS,
2173 _CS_XBS5_LPBIG_OFFBIG_LDFLAGS,
2174 _CS_XBS5_LPBIG_OFFBIG_LIBS,
2175 _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS,
2176 _CS_POSIX_V6_ILP32_OFF32_CFLAGS,
2177 _CS_POSIX_V6_ILP32_OFF32_LDFLAGS,
2178 _CS_POSIX_V6_ILP32_OFF32_LIBS,
2179 _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS,
2180 _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS,
2181 _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS,
2182 _CS_POSIX_V6_ILP32_OFFBIG_LIBS,
2183 _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS,
2184 _CS_POSIX_V6_LP64_OFF64_CFLAGS,
2185 _CS_POSIX_V6_LP64_OFF64_LDFLAGS,
2186 _CS_POSIX_V6_LP64_OFF64_LIBS,
2187 _CS_POSIX_V6_LP64_OFF64_LINTFLAGS,
2188 _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS,
2189 _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS,
2190 _CS_POSIX_V6_LPBIG_OFFBIG_LIBS,
2191 _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS,
2192 _CS_POSIX_V7_ILP32_OFF32_CFLAGS,
2193 _CS_POSIX_V7_ILP32_OFF32_LDFLAGS,
2194 _CS_POSIX_V7_ILP32_OFF32_LIBS,
2195 _CS_POSIX_V7_ILP32_OFF32_LINTFLAGS,
2196 _CS_POSIX_V7_ILP32_OFFBIG_CFLAGS,
2197 _CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS,
2198 _CS_POSIX_V7_ILP32_OFFBIG_LIBS,
2199 _CS_POSIX_V7_ILP32_OFFBIG_LINTFLAGS,
2200 _CS_POSIX_V7_LP64_OFF64_CFLAGS,
2201 _CS_POSIX_V7_LP64_OFF64_LDFLAGS,
2202 _CS_POSIX_V7_LP64_OFF64_LIBS,
2203 _CS_POSIX_V7_LP64_OFF64_LINTFLAGS,
2204 _CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS,
2205 _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS,
2206 _CS_POSIX_V7_LPBIG_OFFBIG_LIBS,
2207 _CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS,
2208 _CS_V6_ENV,
2209 _CS_V7_ENV
2210 };
2211extern long int pathconf (const char *__path, int __name)
2212 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
2213extern long int fpathconf (int __fd, int __name) __attribute__ ((__nothrow__ , __leaf__));
2214extern long int sysconf (int __name) __attribute__ ((__nothrow__ , __leaf__));
2215extern size_t confstr (int __name, char *__buf, size_t __len) __attribute__ ((__nothrow__ , __leaf__));
2216extern __pid_t getpid (void) __attribute__ ((__nothrow__ , __leaf__));
2217extern __pid_t getppid (void) __attribute__ ((__nothrow__ , __leaf__));
2218extern __pid_t getpgrp (void) __attribute__ ((__nothrow__ , __leaf__));
2219extern __pid_t __getpgid (__pid_t __pid) __attribute__ ((__nothrow__ , __leaf__));
2220extern __pid_t getpgid (__pid_t __pid) __attribute__ ((__nothrow__ , __leaf__));
2221extern int setpgid (__pid_t __pid, __pid_t __pgid) __attribute__ ((__nothrow__ , __leaf__));
2222extern int setpgrp (void) __attribute__ ((__nothrow__ , __leaf__));
2223extern __pid_t setsid (void) __attribute__ ((__nothrow__ , __leaf__));
2224extern __pid_t getsid (__pid_t __pid) __attribute__ ((__nothrow__ , __leaf__));
2225extern __uid_t getuid (void) __attribute__ ((__nothrow__ , __leaf__));
2226extern __uid_t geteuid (void) __attribute__ ((__nothrow__ , __leaf__));
2227extern __gid_t getgid (void) __attribute__ ((__nothrow__ , __leaf__));
2228extern __gid_t getegid (void) __attribute__ ((__nothrow__ , __leaf__));
2229extern int getgroups (int __size, __gid_t __list[]) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
2230extern int group_member (__gid_t __gid) __attribute__ ((__nothrow__ , __leaf__));
2231extern int setuid (__uid_t __uid) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
2232extern int setreuid (__uid_t __ruid, __uid_t __euid) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
2233extern int seteuid (__uid_t __uid) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
2234extern int setgid (__gid_t __gid) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
2235extern int setregid (__gid_t __rgid, __gid_t __egid) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
2236extern int setegid (__gid_t __gid) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
2237extern int getresuid (__uid_t *__ruid, __uid_t *__euid, __uid_t *__suid)
2238 __attribute__ ((__nothrow__ , __leaf__));
2239extern int getresgid (__gid_t *__rgid, __gid_t *__egid, __gid_t *__sgid)
2240 __attribute__ ((__nothrow__ , __leaf__));
2241extern int setresuid (__uid_t __ruid, __uid_t __euid, __uid_t __suid)
2242 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
2243extern int setresgid (__gid_t __rgid, __gid_t __egid, __gid_t __sgid)
2244 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
2245extern __pid_t fork (void) __attribute__ ((__nothrow__));
2246extern __pid_t vfork (void) __attribute__ ((__nothrow__ , __leaf__));
2247extern char *ttyname (int __fd) __attribute__ ((__nothrow__ , __leaf__));
2248extern int ttyname_r (int __fd, char *__buf, size_t __buflen)
2249 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))) __attribute__ ((__warn_unused_result__));
2250extern int isatty (int __fd) __attribute__ ((__nothrow__ , __leaf__));
2251extern int ttyslot (void) __attribute__ ((__nothrow__ , __leaf__));
2252extern int link (const char *__from, const char *__to)
2253 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__));
2254extern int linkat (int __fromfd, const char *__from, int __tofd,
2255 const char *__to, int __flags)
2256 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 4))) __attribute__ ((__warn_unused_result__));
2257extern int symlink (const char *__from, const char *__to)
2258 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__));
2259extern ssize_t readlink (const char *__restrict __path,
2260 char *__restrict __buf, size_t __len)
2261 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__));
2262extern int symlinkat (const char *__from, int __tofd,
2263 const char *__to) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 3))) __attribute__ ((__warn_unused_result__));
2264extern ssize_t readlinkat (int __fd, const char *__restrict __path,
2265 char *__restrict __buf, size_t __len)
2266 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__));
2267extern int unlink (const char *__name) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
2268extern int unlinkat (int __fd, const char *__name, int __flag)
2269 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
2270extern int rmdir (const char *__path) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
2271extern __pid_t tcgetpgrp (int __fd) __attribute__ ((__nothrow__ , __leaf__));
2272extern int tcsetpgrp (int __fd, __pid_t __pgrp_id) __attribute__ ((__nothrow__ , __leaf__));
2273extern char *getlogin (void);
2274extern int getlogin_r (char *__name, size_t __name_len) __attribute__ ((__nonnull__ (1)));
2275extern int setlogin (const char *__name) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
2276
2277extern char *optarg;
2278extern int optind;
2279extern int opterr;
2280extern int optopt;
2281extern int getopt (int ___argc, char *const *___argv, const char *__shortopts)
2282 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3)));
2283
2284
2285
2286extern int gethostname (char *__name, size_t __len) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
2287extern int sethostname (const char *__name, size_t __len)
2288 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
2289extern int sethostid (long int __id) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
2290extern int getdomainname (char *__name, size_t __len)
2291 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
2292extern int setdomainname (const char *__name, size_t __len)
2293 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
2294extern int vhangup (void) __attribute__ ((__nothrow__ , __leaf__));
2295extern int revoke (const char *__file) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
2296extern int profil (unsigned short int *__sample_buffer, size_t __size,
2297 size_t __offset, unsigned int __scale)
2298 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
2299extern int acct (const char *__name) __attribute__ ((__nothrow__ , __leaf__));
2300extern char *getusershell (void) __attribute__ ((__nothrow__ , __leaf__));
2301extern void endusershell (void) __attribute__ ((__nothrow__ , __leaf__));
2302extern void setusershell (void) __attribute__ ((__nothrow__ , __leaf__));
2303extern int daemon (int __nochdir, int __noclose) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
2304extern int chroot (const char *__path) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
2305extern char *getpass (const char *__prompt) __attribute__ ((__nonnull__ (1)));
2306extern int fsync (int __fd);
2307extern int syncfs (int __fd) __attribute__ ((__nothrow__ , __leaf__));
2308extern long int gethostid (void);
2309extern void sync (void) __attribute__ ((__nothrow__ , __leaf__));
2310extern int getpagesize (void) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2311extern int getdtablesize (void) __attribute__ ((__nothrow__ , __leaf__));
2312extern int truncate (const char *__file, __off_t __length)
2313 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
2314extern int truncate64 (const char *__file, __off64_t __length)
2315 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
2316extern int ftruncate (int __fd, __off_t __length) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
2317extern int ftruncate64 (int __fd, __off64_t __length) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
2318extern int brk (void *__addr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
2319extern void *sbrk (intptr_t __delta) __attribute__ ((__nothrow__ , __leaf__));
2320extern long int syscall (long int __sysno, ...) __attribute__ ((__nothrow__ , __leaf__));
2321extern int lockf (int __fd, int __cmd, __off_t __len) __attribute__ ((__warn_unused_result__));
2322extern int lockf64 (int __fd, int __cmd, __off64_t __len) __attribute__ ((__warn_unused_result__));
2323ssize_t copy_file_range (int __infd, __off64_t *__pinoff,
2324 int __outfd, __off64_t *__poutoff,
2325 size_t __length, unsigned int __flags);
2326extern int fdatasync (int __fildes);
2327extern char *crypt (const char *__key, const char *__salt)
2328 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
2329extern void swab (const void *__restrict __from, void *__restrict __to,
2330 ssize_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
2331int getentropy (void *__buffer, size_t __length) __attribute__ ((__warn_unused_result__));
2332extern ssize_t __read_chk (int __fd, void *__buf, size_t __nbytes,
2333 size_t __buflen) __attribute__ ((__warn_unused_result__));
2334extern ssize_t __read_alias (int __fd, void *__buf, size_t __nbytes) __asm__ ("" "read") __attribute__ ((__warn_unused_result__));
2335extern ssize_t __read_chk_warn (int __fd, void *__buf, size_t __nbytes, size_t __buflen) __asm__ ("" "__read_chk")
2336 __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("read called with bigger length than size of " "the destination buffer")));
2337extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) ssize_t
2338read (int __fd, void *__buf, size_t __nbytes)
2339{
2340 if (__builtin_object_size (__buf, 0) != (size_t) -1)
2341 {
2342 if (!__builtin_constant_p (__nbytes))
2343 return __read_chk (__fd, __buf, __nbytes, __builtin_object_size (__buf, 0));
2344 if (__nbytes > __builtin_object_size (__buf, 0))
2345 return __read_chk_warn (__fd, __buf, __nbytes, __builtin_object_size (__buf, 0));
2346 }
2347 return __read_alias (__fd, __buf, __nbytes);
2348}
2349extern ssize_t __pread_chk (int __fd, void *__buf, size_t __nbytes,
2350 __off_t __offset, size_t __bufsize) __attribute__ ((__warn_unused_result__));
2351extern ssize_t __pread64_chk (int __fd, void *__buf, size_t __nbytes,
2352 __off64_t __offset, size_t __bufsize) __attribute__ ((__warn_unused_result__));
2353extern ssize_t __pread_alias (int __fd, void *__buf, size_t __nbytes, __off_t __offset) __asm__ ("" "pread") __attribute__ ((__warn_unused_result__));
2354extern ssize_t __pread64_alias (int __fd, void *__buf, size_t __nbytes, __off64_t __offset) __asm__ ("" "pread64") __attribute__ ((__warn_unused_result__));
2355extern ssize_t __pread_chk_warn (int __fd, void *__buf, size_t __nbytes, __off_t __offset, size_t __bufsize) __asm__ ("" "__pread_chk")
2356 __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("pread called with bigger length than size of " "the destination buffer")));
2357extern ssize_t __pread64_chk_warn (int __fd, void *__buf, size_t __nbytes, __off64_t __offset, size_t __bufsize) __asm__ ("" "__pread64_chk")
2358 __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("pread64 called with bigger length than size of " "the destination buffer")));
2359extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) ssize_t
2360pread (int __fd, void *__buf, size_t __nbytes, __off_t __offset)
2361{
2362 if (__builtin_object_size (__buf, 0) != (size_t) -1)
2363 {
2364 if (!__builtin_constant_p (__nbytes))
2365 return __pread_chk (__fd, __buf, __nbytes, __offset, __builtin_object_size (__buf, 0));
2366 if ( __nbytes > __builtin_object_size (__buf, 0))
2367 return __pread_chk_warn (__fd, __buf, __nbytes, __offset,
2368 __builtin_object_size (__buf, 0));
2369 }
2370 return __pread_alias (__fd, __buf, __nbytes, __offset);
2371}
2372extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) ssize_t
2373pread64 (int __fd, void *__buf, size_t __nbytes, __off64_t __offset)
2374{
2375 if (__builtin_object_size (__buf, 0) != (size_t) -1)
2376 {
2377 if (!__builtin_constant_p (__nbytes))
2378 return __pread64_chk (__fd, __buf, __nbytes, __offset, __builtin_object_size (__buf, 0));
2379 if ( __nbytes > __builtin_object_size (__buf, 0))
2380 return __pread64_chk_warn (__fd, __buf, __nbytes, __offset,
2381 __builtin_object_size (__buf, 0));
2382 }
2383 return __pread64_alias (__fd, __buf, __nbytes, __offset);
2384}
2385extern ssize_t __readlink_chk (const char *__restrict __path,
2386 char *__restrict __buf, size_t __len,
2387 size_t __buflen)
2388 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__));
2389extern ssize_t __readlink_alias (const char *__restrict __path, char *__restrict __buf, size_t __len) __asm__ ("" "readlink") __attribute__ ((__nothrow__ , __leaf__))
2390 __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__));
2391extern ssize_t __readlink_chk_warn (const char *__restrict __path, char *__restrict __buf, size_t __len, size_t __buflen) __asm__ ("" "__readlink_chk") __attribute__ ((__nothrow__ , __leaf__))
2392 __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("readlink called with bigger length " "than size of destination buffer")));
2393extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)) ssize_t
2394__attribute__ ((__nothrow__ , __leaf__)) readlink (const char *__restrict __path, char *__restrict __buf, size_t __len)
2395{
2396 if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1)
2397 {
2398 if (!__builtin_constant_p (__len))
2399 return __readlink_chk (__path, __buf, __len, __builtin_object_size (__buf, 2 > 1));
2400 if ( __len > __builtin_object_size (__buf, 2 > 1))
2401 return __readlink_chk_warn (__path, __buf, __len, __builtin_object_size (__buf, 2 > 1));
2402 }
2403 return __readlink_alias (__path, __buf, __len);
2404}
2405extern ssize_t __readlinkat_chk (int __fd, const char *__restrict __path,
2406 char *__restrict __buf, size_t __len,
2407 size_t __buflen)
2408 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__));
2409extern ssize_t __readlinkat_alias (int __fd, const char *__restrict __path, char *__restrict __buf, size_t __len) __asm__ ("" "readlinkat") __attribute__ ((__nothrow__ , __leaf__))
2410 __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__));
2411extern ssize_t __readlinkat_chk_warn (int __fd, const char *__restrict __path, char *__restrict __buf, size_t __len, size_t __buflen) __asm__ ("" "__readlinkat_chk") __attribute__ ((__nothrow__ , __leaf__))
2412 __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("readlinkat called with bigger " "length than size of destination " "buffer")));
2413extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__)) ssize_t
2414__attribute__ ((__nothrow__ , __leaf__)) readlinkat (int __fd, const char *__restrict __path, char *__restrict __buf, size_t __len)
2415{
2416 if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1)
2417 {
2418 if (!__builtin_constant_p (__len))
2419 return __readlinkat_chk (__fd, __path, __buf, __len, __builtin_object_size (__buf, 2 > 1));
2420 if (__len > __builtin_object_size (__buf, 2 > 1))
2421 return __readlinkat_chk_warn (__fd, __path, __buf, __len,
2422 __builtin_object_size (__buf, 2 > 1));
2423 }
2424 return __readlinkat_alias (__fd, __path, __buf, __len);
2425}
2426extern char *__getcwd_chk (char *__buf, size_t __size, size_t __buflen)
2427 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
2428extern char *__getcwd_alias (char *__buf, size_t __size) __asm__ ("" "getcwd") __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
2429extern char *__getcwd_chk_warn (char *__buf, size_t __size, size_t __buflen) __asm__ ("" "__getcwd_chk") __attribute__ ((__nothrow__ , __leaf__))
2430 __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("getcwd caller with bigger length than size of " "destination buffer")));
2431extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) char *
2432__attribute__ ((__nothrow__ , __leaf__)) getcwd (char *__buf, size_t __size)
2433{
2434 if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1)
2435 {
2436 if (!__builtin_constant_p (__size))
2437 return __getcwd_chk (__buf, __size, __builtin_object_size (__buf, 2 > 1));
2438 if (__size > __builtin_object_size (__buf, 2 > 1))
2439 return __getcwd_chk_warn (__buf, __size, __builtin_object_size (__buf, 2 > 1));
2440 }
2441 return __getcwd_alias (__buf, __size);
2442}
2443extern char *__getwd_chk (char *__buf, size_t buflen)
2444 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
2445extern char *__getwd_warn (char *__buf) __asm__ ("" "getwd") __attribute__ ((__nothrow__ , __leaf__))
2446 __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("please use getcwd instead, as getwd " "doesn't specify buffer size")));
2447extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__)) __attribute__ ((__warn_unused_result__)) char *
2448__attribute__ ((__nothrow__ , __leaf__)) getwd (char *__buf)
2449{
2450 if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1)
2451 return __getwd_chk (__buf, __builtin_object_size (__buf, 2 > 1));
2452 return __getwd_warn (__buf);
2453}
2454extern size_t __confstr_chk (int __name, char *__buf, size_t __len,
2455 size_t __buflen) __attribute__ ((__nothrow__ , __leaf__));
2456extern size_t __confstr_alias (int __name, char *__buf, size_t __len) __asm__ ("" "confstr") __attribute__ ((__nothrow__ , __leaf__));
2457extern size_t __confstr_chk_warn (int __name, char *__buf, size_t __len, size_t __buflen) __asm__ ("" "__confstr_chk") __attribute__ ((__nothrow__ , __leaf__))
2458 __attribute__((__warning__ ("confstr called with bigger length than size of destination " "buffer")));
2459extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) size_t
2460__attribute__ ((__nothrow__ , __leaf__)) confstr (int __name, char *__buf, size_t __len)
2461{
2462 if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1)
2463 {
2464 if (!__builtin_constant_p (__len))
2465 return __confstr_chk (__name, __buf, __len, __builtin_object_size (__buf, 2 > 1));
2466 if (__builtin_object_size (__buf, 2 > 1) < __len)
2467 return __confstr_chk_warn (__name, __buf, __len, __builtin_object_size (__buf, 2 > 1));
2468 }
2469 return __confstr_alias (__name, __buf, __len);
2470}
2471extern int __getgroups_chk (int __size, __gid_t __list[], size_t __listlen)
2472 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
2473extern int __getgroups_alias (int __size, __gid_t __list[]) __asm__ ("" "getgroups") __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
2474extern int __getgroups_chk_warn (int __size, __gid_t __list[], size_t __listlen) __asm__ ("" "__getgroups_chk") __attribute__ ((__nothrow__ , __leaf__))
2475 __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("getgroups called with bigger group count than what " "can fit into destination buffer")));
2476extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
2477__attribute__ ((__nothrow__ , __leaf__)) getgroups (int __size, __gid_t __list[])
2478{
2479 if (__builtin_object_size (__list, 2 > 1) != (size_t) -1)
2480 {
2481 if (!__builtin_constant_p (__size) || __size < 0)
2482 return __getgroups_chk (__size, __list, __builtin_object_size (__list, 2 > 1));
2483 if (__size * sizeof (__gid_t) > __builtin_object_size (__list, 2 > 1))
2484 return __getgroups_chk_warn (__size, __list, __builtin_object_size (__list, 2 > 1));
2485 }
2486 return __getgroups_alias (__size, __list);
2487}
2488extern int __ttyname_r_chk (int __fd, char *__buf, size_t __buflen,
2489 size_t __nreal) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
2490extern int __ttyname_r_alias (int __fd, char *__buf, size_t __buflen) __asm__ ("" "ttyname_r") __attribute__ ((__nothrow__ , __leaf__))
2491 __attribute__ ((__nonnull__ (2)));
2492extern int __ttyname_r_chk_warn (int __fd, char *__buf, size_t __buflen, size_t __nreal) __asm__ ("" "__ttyname_r_chk") __attribute__ ((__nothrow__ , __leaf__))
2493 __attribute__ ((__nonnull__ (2))) __attribute__((__warning__ ("ttyname_r called with bigger buflen than " "size of destination buffer")));
2494extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
2495__attribute__ ((__nothrow__ , __leaf__)) ttyname_r (int __fd, char *__buf, size_t __buflen)
2496{
2497 if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1)
2498 {
2499 if (!__builtin_constant_p (__buflen))
2500 return __ttyname_r_chk (__fd, __buf, __buflen, __builtin_object_size (__buf, 2 > 1));
2501 if (__buflen > __builtin_object_size (__buf, 2 > 1))
2502 return __ttyname_r_chk_warn (__fd, __buf, __buflen, __builtin_object_size (__buf, 2 > 1));
2503 }
2504 return __ttyname_r_alias (__fd, __buf, __buflen);
2505}
2506extern int __getlogin_r_chk (char *__buf, size_t __buflen, size_t __nreal)
2507 __attribute__ ((__nonnull__ (1)));
2508extern int __getlogin_r_alias (char *__buf, size_t __buflen) __asm__ ("" "getlogin_r") __attribute__ ((__nonnull__ (1)));
2509extern int __getlogin_r_chk_warn (char *__buf, size_t __buflen, size_t __nreal) __asm__ ("" "__getlogin_r_chk")
2510 __attribute__ ((__nonnull__ (1))) __attribute__((__warning__ ("getlogin_r called with bigger buflen than " "size of destination buffer")));
2511extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
2512getlogin_r (char *__buf, size_t __buflen)
2513{
2514 if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1)
2515 {
2516 if (!__builtin_constant_p (__buflen))
2517 return __getlogin_r_chk (__buf, __buflen, __builtin_object_size (__buf, 2 > 1));
2518 if (__buflen > __builtin_object_size (__buf, 2 > 1))
2519 return __getlogin_r_chk_warn (__buf, __buflen, __builtin_object_size (__buf, 2 > 1));
2520 }
2521 return __getlogin_r_alias (__buf, __buflen);
2522}
2523extern int __gethostname_chk (char *__buf, size_t __buflen, size_t __nreal)
2524 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
2525extern int __gethostname_alias (char *__buf, size_t __buflen) __asm__ ("" "gethostname") __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
2526extern int __gethostname_chk_warn (char *__buf, size_t __buflen, size_t __nreal) __asm__ ("" "__gethostname_chk") __attribute__ ((__nothrow__ , __leaf__))
2527 __attribute__ ((__nonnull__ (1))) __attribute__((__warning__ ("gethostname called with bigger buflen than " "size of destination buffer")));
2528extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
2529__attribute__ ((__nothrow__ , __leaf__)) gethostname (char *__buf, size_t __buflen)
2530{
2531 if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1)
2532 {
2533 if (!__builtin_constant_p (__buflen))
2534 return __gethostname_chk (__buf, __buflen, __builtin_object_size (__buf, 2 > 1));
2535 if (__buflen > __builtin_object_size (__buf, 2 > 1))
2536 return __gethostname_chk_warn (__buf, __buflen, __builtin_object_size (__buf, 2 > 1));
2537 }
2538 return __gethostname_alias (__buf, __buflen);
2539}
2540extern int __getdomainname_chk (char *__buf, size_t __buflen, size_t __nreal)
2541 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
2542extern int __getdomainname_alias (char *__buf, size_t __buflen) __asm__ ("" "getdomainname") __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
2543extern int __getdomainname_chk_warn (char *__buf, size_t __buflen, size_t __nreal) __asm__ ("" "__getdomainname_chk") __attribute__ ((__nothrow__ , __leaf__))
2544 __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("getdomainname called with bigger " "buflen than size of destination " "buffer")));
2545extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
2546__attribute__ ((__nothrow__ , __leaf__)) getdomainname (char *__buf, size_t __buflen)
2547{
2548 if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1)
2549 {
2550 if (!__builtin_constant_p (__buflen))
2551 return __getdomainname_chk (__buf, __buflen, __builtin_object_size (__buf, 2 > 1));
2552 if (__buflen > __builtin_object_size (__buf, 2 > 1))
2553 return __getdomainname_chk_warn (__buf, __buflen, __builtin_object_size (__buf, 2 > 1));
2554 }
2555 return __getdomainname_alias (__buf, __buflen);
2556}
2557extern __pid_t gettid (void) __attribute__ ((__nothrow__ , __leaf__));
2558
2559
2560typedef float float_t;
2561typedef double double_t;
2562enum
2563 {
2564 FP_INT_UPWARD =
2565 0,
2566 FP_INT_DOWNWARD =
2567 1,
2568 FP_INT_TOWARDZERO =
2569 2,
2570 FP_INT_TONEARESTFROMZERO =
2571 3,
2572 FP_INT_TONEAREST =
2573 4,
2574 };
2575extern int __fpclassify (double __value) __attribute__ ((__nothrow__ , __leaf__))
2576 __attribute__ ((__const__));
2577extern int __signbit (double __value) __attribute__ ((__nothrow__ , __leaf__))
2578 __attribute__ ((__const__));
2579extern int __isinf (double __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2580extern int __finite (double __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2581extern int __isnan (double __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2582extern int __iseqsig (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__));
2583extern int __issignaling (double __value) __attribute__ ((__nothrow__ , __leaf__))
2584 __attribute__ ((__const__));
2585extern double acos (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __acos (double __x) __attribute__ ((__nothrow__ , __leaf__));
2586extern double asin (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __asin (double __x) __attribute__ ((__nothrow__ , __leaf__));
2587extern double atan (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __atan (double __x) __attribute__ ((__nothrow__ , __leaf__));
2588extern double atan2 (double __y, double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __atan2 (double __y, double __x) __attribute__ ((__nothrow__ , __leaf__));
2589 extern double cos (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __cos (double __x) __attribute__ ((__nothrow__ , __leaf__));
2590 extern double sin (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __sin (double __x) __attribute__ ((__nothrow__ , __leaf__));
2591extern double tan (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __tan (double __x) __attribute__ ((__nothrow__ , __leaf__));
2592extern double cosh (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __cosh (double __x) __attribute__ ((__nothrow__ , __leaf__));
2593extern double sinh (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __sinh (double __x) __attribute__ ((__nothrow__ , __leaf__));
2594extern double tanh (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __tanh (double __x) __attribute__ ((__nothrow__ , __leaf__));
2595 extern void sincos (double __x, double *__sinx, double *__cosx) __attribute__ ((__nothrow__ , __leaf__)); extern void __sincos (double __x, double *__sinx, double *__cosx) __attribute__ ((__nothrow__ , __leaf__));
2596extern double acosh (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __acosh (double __x) __attribute__ ((__nothrow__ , __leaf__));
2597extern double asinh (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __asinh (double __x) __attribute__ ((__nothrow__ , __leaf__));
2598extern double atanh (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __atanh (double __x) __attribute__ ((__nothrow__ , __leaf__));
2599 extern double exp (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __exp (double __x) __attribute__ ((__nothrow__ , __leaf__));
2600extern double frexp (double __x, int *__exponent) __attribute__ ((__nothrow__ , __leaf__)); extern double __frexp (double __x, int *__exponent) __attribute__ ((__nothrow__ , __leaf__));
2601extern double ldexp (double __x, int __exponent) __attribute__ ((__nothrow__ , __leaf__)); extern double __ldexp (double __x, int __exponent) __attribute__ ((__nothrow__ , __leaf__));
2602 extern double log (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __log (double __x) __attribute__ ((__nothrow__ , __leaf__));
2603extern double log10 (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __log10 (double __x) __attribute__ ((__nothrow__ , __leaf__));
2604extern double modf (double __x, double *__iptr) __attribute__ ((__nothrow__ , __leaf__)); extern double __modf (double __x, double *__iptr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
2605extern double exp10 (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __exp10 (double __x) __attribute__ ((__nothrow__ , __leaf__));
2606extern double expm1 (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __expm1 (double __x) __attribute__ ((__nothrow__ , __leaf__));
2607extern double log1p (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __log1p (double __x) __attribute__ ((__nothrow__ , __leaf__));
2608extern double logb (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __logb (double __x) __attribute__ ((__nothrow__ , __leaf__));
2609extern double exp2 (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __exp2 (double __x) __attribute__ ((__nothrow__ , __leaf__));
2610extern double log2 (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __log2 (double __x) __attribute__ ((__nothrow__ , __leaf__));
2611 extern double pow (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)); extern double __pow (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__));
2612extern double sqrt (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __sqrt (double __x) __attribute__ ((__nothrow__ , __leaf__));
2613extern double hypot (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)); extern double __hypot (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__));
2614extern double cbrt (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __cbrt (double __x) __attribute__ ((__nothrow__ , __leaf__));
2615extern double ceil (double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double __ceil (double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2616extern double fabs (double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double __fabs (double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2617extern double floor (double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double __floor (double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2618extern double fmod (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)); extern double __fmod (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__));
2619extern int isinf (double __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2620extern int finite (double __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2621extern double drem (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)); extern double __drem (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__));
2622extern double significand (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __significand (double __x) __attribute__ ((__nothrow__ , __leaf__));
2623extern double copysign (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double __copysign (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2624extern double nan (const char *__tagb) __attribute__ ((__nothrow__ , __leaf__)); extern double __nan (const char *__tagb) __attribute__ ((__nothrow__ , __leaf__));
2625extern int isnan (double __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2626extern double j0 (double) __attribute__ ((__nothrow__ , __leaf__)); extern double __j0 (double) __attribute__ ((__nothrow__ , __leaf__));
2627extern double j1 (double) __attribute__ ((__nothrow__ , __leaf__)); extern double __j1 (double) __attribute__ ((__nothrow__ , __leaf__));
2628extern double jn (int, double) __attribute__ ((__nothrow__ , __leaf__)); extern double __jn (int, double) __attribute__ ((__nothrow__ , __leaf__));
2629extern double y0 (double) __attribute__ ((__nothrow__ , __leaf__)); extern double __y0 (double) __attribute__ ((__nothrow__ , __leaf__));
2630extern double y1 (double) __attribute__ ((__nothrow__ , __leaf__)); extern double __y1 (double) __attribute__ ((__nothrow__ , __leaf__));
2631extern double yn (int, double) __attribute__ ((__nothrow__ , __leaf__)); extern double __yn (int, double) __attribute__ ((__nothrow__ , __leaf__));
2632extern double erf (double) __attribute__ ((__nothrow__ , __leaf__)); extern double __erf (double) __attribute__ ((__nothrow__ , __leaf__));
2633extern double erfc (double) __attribute__ ((__nothrow__ , __leaf__)); extern double __erfc (double) __attribute__ ((__nothrow__ , __leaf__));
2634extern double lgamma (double) __attribute__ ((__nothrow__ , __leaf__)); extern double __lgamma (double) __attribute__ ((__nothrow__ , __leaf__));
2635extern double tgamma (double) __attribute__ ((__nothrow__ , __leaf__)); extern double __tgamma (double) __attribute__ ((__nothrow__ , __leaf__));
2636extern double gamma (double) __attribute__ ((__nothrow__ , __leaf__)); extern double __gamma (double) __attribute__ ((__nothrow__ , __leaf__));
2637extern double lgamma_r (double, int *__signgamp) __attribute__ ((__nothrow__ , __leaf__)); extern double __lgamma_r (double, int *__signgamp) __attribute__ ((__nothrow__ , __leaf__));
2638extern double rint (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __rint (double __x) __attribute__ ((__nothrow__ , __leaf__));
2639extern double nextafter (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)); extern double __nextafter (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__));
2640extern double nexttoward (double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); extern double __nexttoward (double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__));
2641extern double nextdown (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __nextdown (double __x) __attribute__ ((__nothrow__ , __leaf__));
2642extern double nextup (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __nextup (double __x) __attribute__ ((__nothrow__ , __leaf__));
2643extern double remainder (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)); extern double __remainder (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__));
2644extern double scalbn (double __x, int __n) __attribute__ ((__nothrow__ , __leaf__)); extern double __scalbn (double __x, int __n) __attribute__ ((__nothrow__ , __leaf__));
2645extern int ilogb (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern int __ilogb (double __x) __attribute__ ((__nothrow__ , __leaf__));
2646extern long int llogb (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __llogb (double __x) __attribute__ ((__nothrow__ , __leaf__));
2647extern double scalbln (double __x, long int __n) __attribute__ ((__nothrow__ , __leaf__)); extern double __scalbln (double __x, long int __n) __attribute__ ((__nothrow__ , __leaf__));
2648extern double nearbyint (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern double __nearbyint (double __x) __attribute__ ((__nothrow__ , __leaf__));
2649extern double round (double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double __round (double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2650extern double trunc (double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double __trunc (double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2651extern double remquo (double __x, double __y, int *__quo) __attribute__ ((__nothrow__ , __leaf__)); extern double __remquo (double __x, double __y, int *__quo) __attribute__ ((__nothrow__ , __leaf__));
2652extern long int lrint (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __lrint (double __x) __attribute__ ((__nothrow__ , __leaf__));
2653__extension__
2654extern long long int llrint (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long long int __llrint (double __x) __attribute__ ((__nothrow__ , __leaf__));
2655extern long int lround (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __lround (double __x) __attribute__ ((__nothrow__ , __leaf__));
2656__extension__
2657extern long long int llround (double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long long int __llround (double __x) __attribute__ ((__nothrow__ , __leaf__));
2658extern double fdim (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)); extern double __fdim (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__));
2659extern double fmax (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double __fmax (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2660extern double fmin (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double __fmin (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2661extern double fma (double __x, double __y, double __z) __attribute__ ((__nothrow__ , __leaf__)); extern double __fma (double __x, double __y, double __z) __attribute__ ((__nothrow__ , __leaf__));
2662extern double roundeven (double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double __roundeven (double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2663extern __intmax_t fromfp (double __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __intmax_t __fromfp (double __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
2664extern __uintmax_t ufromfp (double __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __uintmax_t __ufromfp (double __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
2665extern __intmax_t fromfpx (double __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __intmax_t __fromfpx (double __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
2666extern __uintmax_t ufromfpx (double __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __uintmax_t __ufromfpx (double __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
2667extern double fmaxmag (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double __fmaxmag (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2668extern double fminmag (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern double __fminmag (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2669extern int totalorder (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__))
2670 __attribute__ ((__const__));
2671extern int totalordermag (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__))
2672 __attribute__ ((__const__));
2673extern int canonicalize (double *__cx, const double *__x) __attribute__ ((__nothrow__ , __leaf__));
2674extern double getpayload (const double *__x) __attribute__ ((__nothrow__ , __leaf__)); extern double __getpayload (const double *__x) __attribute__ ((__nothrow__ , __leaf__));
2675extern int setpayload (double *__x, double __payload) __attribute__ ((__nothrow__ , __leaf__));
2676extern int setpayloadsig (double *__x, double __payload) __attribute__ ((__nothrow__ , __leaf__));
2677extern double scalb (double __x, double __n) __attribute__ ((__nothrow__ , __leaf__)); extern double __scalb (double __x, double __n) __attribute__ ((__nothrow__ , __leaf__));
2678extern int __fpclassifyf (float __value) __attribute__ ((__nothrow__ , __leaf__))
2679 __attribute__ ((__const__));
2680extern int __signbitf (float __value) __attribute__ ((__nothrow__ , __leaf__))
2681 __attribute__ ((__const__));
2682extern int __isinff (float __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2683extern int __finitef (float __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2684extern int __isnanf (float __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2685extern int __iseqsigf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__));
2686extern int __issignalingf (float __value) __attribute__ ((__nothrow__ , __leaf__))
2687 __attribute__ ((__const__));
2688extern float acosf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __acosf (float __x) __attribute__ ((__nothrow__ , __leaf__));
2689extern float asinf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __asinf (float __x) __attribute__ ((__nothrow__ , __leaf__));
2690extern float atanf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __atanf (float __x) __attribute__ ((__nothrow__ , __leaf__));
2691extern float atan2f (float __y, float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __atan2f (float __y, float __x) __attribute__ ((__nothrow__ , __leaf__));
2692 extern float cosf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __cosf (float __x) __attribute__ ((__nothrow__ , __leaf__));
2693 extern float sinf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __sinf (float __x) __attribute__ ((__nothrow__ , __leaf__));
2694extern float tanf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __tanf (float __x) __attribute__ ((__nothrow__ , __leaf__));
2695extern float coshf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __coshf (float __x) __attribute__ ((__nothrow__ , __leaf__));
2696extern float sinhf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __sinhf (float __x) __attribute__ ((__nothrow__ , __leaf__));
2697extern float tanhf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __tanhf (float __x) __attribute__ ((__nothrow__ , __leaf__));
2698 extern void sincosf (float __x, float *__sinx, float *__cosx) __attribute__ ((__nothrow__ , __leaf__)); extern void __sincosf (float __x, float *__sinx, float *__cosx) __attribute__ ((__nothrow__ , __leaf__));
2699extern float acoshf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __acoshf (float __x) __attribute__ ((__nothrow__ , __leaf__));
2700extern float asinhf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __asinhf (float __x) __attribute__ ((__nothrow__ , __leaf__));
2701extern float atanhf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __atanhf (float __x) __attribute__ ((__nothrow__ , __leaf__));
2702 extern float expf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __expf (float __x) __attribute__ ((__nothrow__ , __leaf__));
2703extern float frexpf (float __x, int *__exponent) __attribute__ ((__nothrow__ , __leaf__)); extern float __frexpf (float __x, int *__exponent) __attribute__ ((__nothrow__ , __leaf__));
2704extern float ldexpf (float __x, int __exponent) __attribute__ ((__nothrow__ , __leaf__)); extern float __ldexpf (float __x, int __exponent) __attribute__ ((__nothrow__ , __leaf__));
2705 extern float logf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __logf (float __x) __attribute__ ((__nothrow__ , __leaf__));
2706extern float log10f (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __log10f (float __x) __attribute__ ((__nothrow__ , __leaf__));
2707extern float modff (float __x, float *__iptr) __attribute__ ((__nothrow__ , __leaf__)); extern float __modff (float __x, float *__iptr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
2708extern float exp10f (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __exp10f (float __x) __attribute__ ((__nothrow__ , __leaf__));
2709extern float expm1f (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __expm1f (float __x) __attribute__ ((__nothrow__ , __leaf__));
2710extern float log1pf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __log1pf (float __x) __attribute__ ((__nothrow__ , __leaf__));
2711extern float logbf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __logbf (float __x) __attribute__ ((__nothrow__ , __leaf__));
2712extern float exp2f (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __exp2f (float __x) __attribute__ ((__nothrow__ , __leaf__));
2713extern float log2f (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __log2f (float __x) __attribute__ ((__nothrow__ , __leaf__));
2714 extern float powf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)); extern float __powf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__));
2715extern float sqrtf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __sqrtf (float __x) __attribute__ ((__nothrow__ , __leaf__));
2716extern float hypotf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)); extern float __hypotf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__));
2717extern float cbrtf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __cbrtf (float __x) __attribute__ ((__nothrow__ , __leaf__));
2718extern float ceilf (float __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float __ceilf (float __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2719extern float fabsf (float __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float __fabsf (float __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2720extern float floorf (float __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float __floorf (float __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2721extern float fmodf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)); extern float __fmodf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__));
2722extern int isinff (float __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2723extern int finitef (float __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2724extern float dremf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)); extern float __dremf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__));
2725extern float significandf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __significandf (float __x) __attribute__ ((__nothrow__ , __leaf__));
2726extern float copysignf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float __copysignf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2727extern float nanf (const char *__tagb) __attribute__ ((__nothrow__ , __leaf__)); extern float __nanf (const char *__tagb) __attribute__ ((__nothrow__ , __leaf__));
2728extern int isnanf (float __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2729extern float j0f (float) __attribute__ ((__nothrow__ , __leaf__)); extern float __j0f (float) __attribute__ ((__nothrow__ , __leaf__));
2730extern float j1f (float) __attribute__ ((__nothrow__ , __leaf__)); extern float __j1f (float) __attribute__ ((__nothrow__ , __leaf__));
2731extern float jnf (int, float) __attribute__ ((__nothrow__ , __leaf__)); extern float __jnf (int, float) __attribute__ ((__nothrow__ , __leaf__));
2732extern float y0f (float) __attribute__ ((__nothrow__ , __leaf__)); extern float __y0f (float) __attribute__ ((__nothrow__ , __leaf__));
2733extern float y1f (float) __attribute__ ((__nothrow__ , __leaf__)); extern float __y1f (float) __attribute__ ((__nothrow__ , __leaf__));
2734extern float ynf (int, float) __attribute__ ((__nothrow__ , __leaf__)); extern float __ynf (int, float) __attribute__ ((__nothrow__ , __leaf__));
2735extern float erff (float) __attribute__ ((__nothrow__ , __leaf__)); extern float __erff (float) __attribute__ ((__nothrow__ , __leaf__));
2736extern float erfcf (float) __attribute__ ((__nothrow__ , __leaf__)); extern float __erfcf (float) __attribute__ ((__nothrow__ , __leaf__));
2737extern float lgammaf (float) __attribute__ ((__nothrow__ , __leaf__)); extern float __lgammaf (float) __attribute__ ((__nothrow__ , __leaf__));
2738extern float tgammaf (float) __attribute__ ((__nothrow__ , __leaf__)); extern float __tgammaf (float) __attribute__ ((__nothrow__ , __leaf__));
2739extern float gammaf (float) __attribute__ ((__nothrow__ , __leaf__)); extern float __gammaf (float) __attribute__ ((__nothrow__ , __leaf__));
2740extern float lgammaf_r (float, int *__signgamp) __attribute__ ((__nothrow__ , __leaf__)); extern float __lgammaf_r (float, int *__signgamp) __attribute__ ((__nothrow__ , __leaf__));
2741extern float rintf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __rintf (float __x) __attribute__ ((__nothrow__ , __leaf__));
2742extern float nextafterf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)); extern float __nextafterf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__));
2743extern float nexttowardf (float __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); extern float __nexttowardf (float __x, long double __y) __attribute__ ((__nothrow__ , __leaf__));
2744extern float nextdownf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __nextdownf (float __x) __attribute__ ((__nothrow__ , __leaf__));
2745extern float nextupf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __nextupf (float __x) __attribute__ ((__nothrow__ , __leaf__));
2746extern float remainderf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)); extern float __remainderf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__));
2747extern float scalbnf (float __x, int __n) __attribute__ ((__nothrow__ , __leaf__)); extern float __scalbnf (float __x, int __n) __attribute__ ((__nothrow__ , __leaf__));
2748extern int ilogbf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern int __ilogbf (float __x) __attribute__ ((__nothrow__ , __leaf__));
2749extern long int llogbf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __llogbf (float __x) __attribute__ ((__nothrow__ , __leaf__));
2750extern float scalblnf (float __x, long int __n) __attribute__ ((__nothrow__ , __leaf__)); extern float __scalblnf (float __x, long int __n) __attribute__ ((__nothrow__ , __leaf__));
2751extern float nearbyintf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern float __nearbyintf (float __x) __attribute__ ((__nothrow__ , __leaf__));
2752extern float roundf (float __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float __roundf (float __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2753extern float truncf (float __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float __truncf (float __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2754extern float remquof (float __x, float __y, int *__quo) __attribute__ ((__nothrow__ , __leaf__)); extern float __remquof (float __x, float __y, int *__quo) __attribute__ ((__nothrow__ , __leaf__));
2755extern long int lrintf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __lrintf (float __x) __attribute__ ((__nothrow__ , __leaf__));
2756__extension__
2757extern long long int llrintf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern long long int __llrintf (float __x) __attribute__ ((__nothrow__ , __leaf__));
2758extern long int lroundf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __lroundf (float __x) __attribute__ ((__nothrow__ , __leaf__));
2759__extension__
2760extern long long int llroundf (float __x) __attribute__ ((__nothrow__ , __leaf__)); extern long long int __llroundf (float __x) __attribute__ ((__nothrow__ , __leaf__));
2761extern float fdimf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)); extern float __fdimf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__));
2762extern float fmaxf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float __fmaxf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2763extern float fminf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float __fminf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2764extern float fmaf (float __x, float __y, float __z) __attribute__ ((__nothrow__ , __leaf__)); extern float __fmaf (float __x, float __y, float __z) __attribute__ ((__nothrow__ , __leaf__));
2765extern float roundevenf (float __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float __roundevenf (float __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2766extern __intmax_t fromfpf (float __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __intmax_t __fromfpf (float __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
2767extern __uintmax_t ufromfpf (float __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __uintmax_t __ufromfpf (float __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
2768extern __intmax_t fromfpxf (float __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __intmax_t __fromfpxf (float __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
2769extern __uintmax_t ufromfpxf (float __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __uintmax_t __ufromfpxf (float __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
2770extern float fmaxmagf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float __fmaxmagf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2771extern float fminmagf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern float __fminmagf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2772extern int totalorderf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__))
2773 __attribute__ ((__const__));
2774extern int totalordermagf (float __x, float __y) __attribute__ ((__nothrow__ , __leaf__))
2775 __attribute__ ((__const__));
2776extern int canonicalizef (float *__cx, const float *__x) __attribute__ ((__nothrow__ , __leaf__));
2777extern float getpayloadf (const float *__x) __attribute__ ((__nothrow__ , __leaf__)); extern float __getpayloadf (const float *__x) __attribute__ ((__nothrow__ , __leaf__));
2778extern int setpayloadf (float *__x, float __payload) __attribute__ ((__nothrow__ , __leaf__));
2779extern int setpayloadsigf (float *__x, float __payload) __attribute__ ((__nothrow__ , __leaf__));
2780extern float scalbf (float __x, float __n) __attribute__ ((__nothrow__ , __leaf__)); extern float __scalbf (float __x, float __n) __attribute__ ((__nothrow__ , __leaf__));
2781extern int __fpclassifyl (long double __value) __attribute__ ((__nothrow__ , __leaf__))
2782 __attribute__ ((__const__));
2783extern int __signbitl (long double __value) __attribute__ ((__nothrow__ , __leaf__))
2784 __attribute__ ((__const__));
2785extern int __isinfl (long double __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2786extern int __finitel (long double __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2787extern int __isnanl (long double __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2788extern int __iseqsigl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__));
2789extern int __issignalingl (long double __value) __attribute__ ((__nothrow__ , __leaf__))
2790 __attribute__ ((__const__));
2791extern long double acosl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __acosl (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2792extern long double asinl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __asinl (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2793extern long double atanl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __atanl (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2794extern long double atan2l (long double __y, long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __atan2l (long double __y, long double __x) __attribute__ ((__nothrow__ , __leaf__));
2795 extern long double cosl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __cosl (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2796 extern long double sinl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __sinl (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2797extern long double tanl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __tanl (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2798extern long double coshl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __coshl (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2799extern long double sinhl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __sinhl (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2800extern long double tanhl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __tanhl (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2801 extern void sincosl (long double __x, long double *__sinx, long double *__cosx) __attribute__ ((__nothrow__ , __leaf__)); extern void __sincosl (long double __x, long double *__sinx, long double *__cosx) __attribute__ ((__nothrow__ , __leaf__));
2802extern long double acoshl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __acoshl (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2803extern long double asinhl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __asinhl (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2804extern long double atanhl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __atanhl (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2805 extern long double expl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __expl (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2806extern long double frexpl (long double __x, int *__exponent) __attribute__ ((__nothrow__ , __leaf__)); extern long double __frexpl (long double __x, int *__exponent) __attribute__ ((__nothrow__ , __leaf__));
2807extern long double ldexpl (long double __x, int __exponent) __attribute__ ((__nothrow__ , __leaf__)); extern long double __ldexpl (long double __x, int __exponent) __attribute__ ((__nothrow__ , __leaf__));
2808 extern long double logl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __logl (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2809extern long double log10l (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __log10l (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2810extern long double modfl (long double __x, long double *__iptr) __attribute__ ((__nothrow__ , __leaf__)); extern long double __modfl (long double __x, long double *__iptr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
2811extern long double exp10l (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __exp10l (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2812extern long double expm1l (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __expm1l (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2813extern long double log1pl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __log1pl (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2814extern long double logbl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __logbl (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2815extern long double exp2l (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __exp2l (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2816extern long double log2l (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __log2l (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2817 extern long double powl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); extern long double __powl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__));
2818extern long double sqrtl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __sqrtl (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2819extern long double hypotl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); extern long double __hypotl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__));
2820extern long double cbrtl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __cbrtl (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2821extern long double ceill (long double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double __ceill (long double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2822extern long double fabsl (long double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double __fabsl (long double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2823extern long double floorl (long double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double __floorl (long double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2824extern long double fmodl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); extern long double __fmodl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__));
2825extern int isinfl (long double __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2826extern int finitel (long double __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2827extern long double dreml (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); extern long double __dreml (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__));
2828extern long double significandl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __significandl (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2829extern long double copysignl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double __copysignl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2830extern long double nanl (const char *__tagb) __attribute__ ((__nothrow__ , __leaf__)); extern long double __nanl (const char *__tagb) __attribute__ ((__nothrow__ , __leaf__));
2831extern int isnanl (long double __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2832extern long double j0l (long double) __attribute__ ((__nothrow__ , __leaf__)); extern long double __j0l (long double) __attribute__ ((__nothrow__ , __leaf__));
2833extern long double j1l (long double) __attribute__ ((__nothrow__ , __leaf__)); extern long double __j1l (long double) __attribute__ ((__nothrow__ , __leaf__));
2834extern long double jnl (int, long double) __attribute__ ((__nothrow__ , __leaf__)); extern long double __jnl (int, long double) __attribute__ ((__nothrow__ , __leaf__));
2835extern long double y0l (long double) __attribute__ ((__nothrow__ , __leaf__)); extern long double __y0l (long double) __attribute__ ((__nothrow__ , __leaf__));
2836extern long double y1l (long double) __attribute__ ((__nothrow__ , __leaf__)); extern long double __y1l (long double) __attribute__ ((__nothrow__ , __leaf__));
2837extern long double ynl (int, long double) __attribute__ ((__nothrow__ , __leaf__)); extern long double __ynl (int, long double) __attribute__ ((__nothrow__ , __leaf__));
2838extern long double erfl (long double) __attribute__ ((__nothrow__ , __leaf__)); extern long double __erfl (long double) __attribute__ ((__nothrow__ , __leaf__));
2839extern long double erfcl (long double) __attribute__ ((__nothrow__ , __leaf__)); extern long double __erfcl (long double) __attribute__ ((__nothrow__ , __leaf__));
2840extern long double lgammal (long double) __attribute__ ((__nothrow__ , __leaf__)); extern long double __lgammal (long double) __attribute__ ((__nothrow__ , __leaf__));
2841extern long double tgammal (long double) __attribute__ ((__nothrow__ , __leaf__)); extern long double __tgammal (long double) __attribute__ ((__nothrow__ , __leaf__));
2842extern long double gammal (long double) __attribute__ ((__nothrow__ , __leaf__)); extern long double __gammal (long double) __attribute__ ((__nothrow__ , __leaf__));
2843extern long double lgammal_r (long double, int *__signgamp) __attribute__ ((__nothrow__ , __leaf__)); extern long double __lgammal_r (long double, int *__signgamp) __attribute__ ((__nothrow__ , __leaf__));
2844extern long double rintl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __rintl (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2845extern long double nextafterl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); extern long double __nextafterl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__));
2846extern long double nexttowardl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); extern long double __nexttowardl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__));
2847extern long double nextdownl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __nextdownl (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2848extern long double nextupl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __nextupl (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2849extern long double remainderl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); extern long double __remainderl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__));
2850extern long double scalbnl (long double __x, int __n) __attribute__ ((__nothrow__ , __leaf__)); extern long double __scalbnl (long double __x, int __n) __attribute__ ((__nothrow__ , __leaf__));
2851extern int ilogbl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern int __ilogbl (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2852extern long int llogbl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __llogbl (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2853extern long double scalblnl (long double __x, long int __n) __attribute__ ((__nothrow__ , __leaf__)); extern long double __scalblnl (long double __x, long int __n) __attribute__ ((__nothrow__ , __leaf__));
2854extern long double nearbyintl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __nearbyintl (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2855extern long double roundl (long double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double __roundl (long double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2856extern long double truncl (long double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double __truncl (long double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2857extern long double remquol (long double __x, long double __y, int *__quo) __attribute__ ((__nothrow__ , __leaf__)); extern long double __remquol (long double __x, long double __y, int *__quo) __attribute__ ((__nothrow__ , __leaf__));
2858extern long int lrintl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __lrintl (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2859__extension__
2860extern long long int llrintl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long long int __llrintl (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2861extern long int lroundl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __lroundl (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2862__extension__
2863extern long long int llroundl (long double __x) __attribute__ ((__nothrow__ , __leaf__)); extern long long int __llroundl (long double __x) __attribute__ ((__nothrow__ , __leaf__));
2864extern long double fdiml (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)); extern long double __fdiml (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__));
2865extern long double fmaxl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double __fmaxl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2866extern long double fminl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double __fminl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2867extern long double fmal (long double __x, long double __y, long double __z) __attribute__ ((__nothrow__ , __leaf__)); extern long double __fmal (long double __x, long double __y, long double __z) __attribute__ ((__nothrow__ , __leaf__));
2868extern long double roundevenl (long double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double __roundevenl (long double __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2869extern __intmax_t fromfpl (long double __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __intmax_t __fromfpl (long double __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
2870extern __uintmax_t ufromfpl (long double __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __uintmax_t __ufromfpl (long double __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
2871extern __intmax_t fromfpxl (long double __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __intmax_t __fromfpxl (long double __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
2872extern __uintmax_t ufromfpxl (long double __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __uintmax_t __ufromfpxl (long double __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
2873extern long double fmaxmagl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double __fmaxmagl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2874extern long double fminmagl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern long double __fminmagl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2875extern int totalorderl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__))
2876 __attribute__ ((__const__));
2877extern int totalordermagl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__))
2878 __attribute__ ((__const__));
2879extern int canonicalizel (long double *__cx, const long double *__x) __attribute__ ((__nothrow__ , __leaf__));
2880extern long double getpayloadl (const long double *__x) __attribute__ ((__nothrow__ , __leaf__)); extern long double __getpayloadl (const long double *__x) __attribute__ ((__nothrow__ , __leaf__));
2881extern int setpayloadl (long double *__x, long double __payload) __attribute__ ((__nothrow__ , __leaf__));
2882extern int setpayloadsigl (long double *__x, long double __payload) __attribute__ ((__nothrow__ , __leaf__));
2883extern long double scalbl (long double __x, long double __n) __attribute__ ((__nothrow__ , __leaf__)); extern long double __scalbl (long double __x, long double __n) __attribute__ ((__nothrow__ , __leaf__));
2884extern _Float32 acosf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __acosf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2885extern _Float32 asinf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __asinf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2886extern _Float32 atanf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __atanf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2887extern _Float32 atan2f32 (_Float32 __y, _Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __atan2f32 (_Float32 __y, _Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2888 extern _Float32 cosf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __cosf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2889 extern _Float32 sinf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __sinf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2890extern _Float32 tanf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __tanf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2891extern _Float32 coshf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __coshf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2892extern _Float32 sinhf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __sinhf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2893extern _Float32 tanhf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __tanhf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2894 extern void sincosf32 (_Float32 __x, _Float32 *__sinx, _Float32 *__cosx) __attribute__ ((__nothrow__ , __leaf__)); extern void __sincosf32 (_Float32 __x, _Float32 *__sinx, _Float32 *__cosx) __attribute__ ((__nothrow__ , __leaf__));
2895extern _Float32 acoshf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __acoshf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2896extern _Float32 asinhf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __asinhf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2897extern _Float32 atanhf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __atanhf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2898 extern _Float32 expf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __expf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2899extern _Float32 frexpf32 (_Float32 __x, int *__exponent) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __frexpf32 (_Float32 __x, int *__exponent) __attribute__ ((__nothrow__ , __leaf__));
2900extern _Float32 ldexpf32 (_Float32 __x, int __exponent) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __ldexpf32 (_Float32 __x, int __exponent) __attribute__ ((__nothrow__ , __leaf__));
2901 extern _Float32 logf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __logf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2902extern _Float32 log10f32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __log10f32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2903extern _Float32 modff32 (_Float32 __x, _Float32 *__iptr) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __modff32 (_Float32 __x, _Float32 *__iptr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
2904extern _Float32 exp10f32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __exp10f32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2905extern _Float32 expm1f32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __expm1f32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2906extern _Float32 log1pf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __log1pf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2907extern _Float32 logbf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __logbf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2908extern _Float32 exp2f32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __exp2f32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2909extern _Float32 log2f32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __log2f32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2910 extern _Float32 powf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __powf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__));
2911extern _Float32 sqrtf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __sqrtf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2912extern _Float32 hypotf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __hypotf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__));
2913extern _Float32 cbrtf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __cbrtf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2914extern _Float32 ceilf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32 __ceilf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2915extern _Float32 fabsf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32 __fabsf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2916extern _Float32 floorf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32 __floorf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2917extern _Float32 fmodf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __fmodf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__));
2918extern _Float32 copysignf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32 __copysignf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2919extern _Float32 nanf32 (const char *__tagb) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __nanf32 (const char *__tagb) __attribute__ ((__nothrow__ , __leaf__));
2920extern _Float32 j0f32 (_Float32) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __j0f32 (_Float32) __attribute__ ((__nothrow__ , __leaf__));
2921extern _Float32 j1f32 (_Float32) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __j1f32 (_Float32) __attribute__ ((__nothrow__ , __leaf__));
2922extern _Float32 jnf32 (int, _Float32) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __jnf32 (int, _Float32) __attribute__ ((__nothrow__ , __leaf__));
2923extern _Float32 y0f32 (_Float32) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __y0f32 (_Float32) __attribute__ ((__nothrow__ , __leaf__));
2924extern _Float32 y1f32 (_Float32) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __y1f32 (_Float32) __attribute__ ((__nothrow__ , __leaf__));
2925extern _Float32 ynf32 (int, _Float32) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __ynf32 (int, _Float32) __attribute__ ((__nothrow__ , __leaf__));
2926extern _Float32 erff32 (_Float32) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __erff32 (_Float32) __attribute__ ((__nothrow__ , __leaf__));
2927extern _Float32 erfcf32 (_Float32) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __erfcf32 (_Float32) __attribute__ ((__nothrow__ , __leaf__));
2928extern _Float32 lgammaf32 (_Float32) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __lgammaf32 (_Float32) __attribute__ ((__nothrow__ , __leaf__));
2929extern _Float32 tgammaf32 (_Float32) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __tgammaf32 (_Float32) __attribute__ ((__nothrow__ , __leaf__));
2930extern _Float32 lgammaf32_r (_Float32, int *__signgamp) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __lgammaf32_r (_Float32, int *__signgamp) __attribute__ ((__nothrow__ , __leaf__));
2931extern _Float32 rintf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __rintf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2932extern _Float32 nextafterf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __nextafterf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__));
2933extern _Float32 nextdownf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __nextdownf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2934extern _Float32 nextupf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __nextupf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2935extern _Float32 remainderf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __remainderf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__));
2936extern _Float32 scalbnf32 (_Float32 __x, int __n) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __scalbnf32 (_Float32 __x, int __n) __attribute__ ((__nothrow__ , __leaf__));
2937extern int ilogbf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern int __ilogbf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2938extern long int llogbf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __llogbf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2939extern _Float32 scalblnf32 (_Float32 __x, long int __n) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __scalblnf32 (_Float32 __x, long int __n) __attribute__ ((__nothrow__ , __leaf__));
2940extern _Float32 nearbyintf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __nearbyintf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2941extern _Float32 roundf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32 __roundf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2942extern _Float32 truncf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32 __truncf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2943extern _Float32 remquof32 (_Float32 __x, _Float32 __y, int *__quo) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __remquof32 (_Float32 __x, _Float32 __y, int *__quo) __attribute__ ((__nothrow__ , __leaf__));
2944extern long int lrintf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __lrintf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2945__extension__
2946extern long long int llrintf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern long long int __llrintf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2947extern long int lroundf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __lroundf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2948__extension__
2949extern long long int llroundf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)); extern long long int __llroundf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__));
2950extern _Float32 fdimf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __fdimf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__));
2951extern _Float32 fmaxf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32 __fmaxf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2952extern _Float32 fminf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32 __fminf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2953extern _Float32 fmaf32 (_Float32 __x, _Float32 __y, _Float32 __z) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __fmaf32 (_Float32 __x, _Float32 __y, _Float32 __z) __attribute__ ((__nothrow__ , __leaf__));
2954extern _Float32 roundevenf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32 __roundevenf32 (_Float32 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2955extern __intmax_t fromfpf32 (_Float32 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __intmax_t __fromfpf32 (_Float32 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
2956extern __uintmax_t ufromfpf32 (_Float32 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __uintmax_t __ufromfpf32 (_Float32 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
2957extern __intmax_t fromfpxf32 (_Float32 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __intmax_t __fromfpxf32 (_Float32 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
2958extern __uintmax_t ufromfpxf32 (_Float32 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __uintmax_t __ufromfpxf32 (_Float32 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
2959extern _Float32 fmaxmagf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32 __fmaxmagf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2960extern _Float32 fminmagf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32 __fminmagf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
2961extern int totalorderf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__))
2962 __attribute__ ((__const__));
2963extern int totalordermagf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ , __leaf__))
2964 __attribute__ ((__const__));
2965extern int canonicalizef32 (_Float32 *__cx, const _Float32 *__x) __attribute__ ((__nothrow__ , __leaf__));
2966extern _Float32 getpayloadf32 (const _Float32 *__x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32 __getpayloadf32 (const _Float32 *__x) __attribute__ ((__nothrow__ , __leaf__));
2967extern int setpayloadf32 (_Float32 *__x, _Float32 __payload) __attribute__ ((__nothrow__ , __leaf__));
2968extern int setpayloadsigf32 (_Float32 *__x, _Float32 __payload) __attribute__ ((__nothrow__ , __leaf__));
2969extern _Float64 acosf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __acosf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
2970extern _Float64 asinf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __asinf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
2971extern _Float64 atanf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __atanf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
2972extern _Float64 atan2f64 (_Float64 __y, _Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __atan2f64 (_Float64 __y, _Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
2973 extern _Float64 cosf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __cosf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
2974 extern _Float64 sinf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __sinf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
2975extern _Float64 tanf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __tanf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
2976extern _Float64 coshf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __coshf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
2977extern _Float64 sinhf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __sinhf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
2978extern _Float64 tanhf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __tanhf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
2979 extern void sincosf64 (_Float64 __x, _Float64 *__sinx, _Float64 *__cosx) __attribute__ ((__nothrow__ , __leaf__)); extern void __sincosf64 (_Float64 __x, _Float64 *__sinx, _Float64 *__cosx) __attribute__ ((__nothrow__ , __leaf__));
2980extern _Float64 acoshf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __acoshf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
2981extern _Float64 asinhf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __asinhf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
2982extern _Float64 atanhf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __atanhf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
2983 extern _Float64 expf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __expf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
2984extern _Float64 frexpf64 (_Float64 __x, int *__exponent) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __frexpf64 (_Float64 __x, int *__exponent) __attribute__ ((__nothrow__ , __leaf__));
2985extern _Float64 ldexpf64 (_Float64 __x, int __exponent) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __ldexpf64 (_Float64 __x, int __exponent) __attribute__ ((__nothrow__ , __leaf__));
2986 extern _Float64 logf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __logf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
2987extern _Float64 log10f64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __log10f64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
2988extern _Float64 modff64 (_Float64 __x, _Float64 *__iptr) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __modff64 (_Float64 __x, _Float64 *__iptr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
2989extern _Float64 exp10f64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __exp10f64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
2990extern _Float64 expm1f64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __expm1f64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
2991extern _Float64 log1pf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __log1pf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
2992extern _Float64 logbf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __logbf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
2993extern _Float64 exp2f64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __exp2f64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
2994extern _Float64 log2f64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __log2f64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
2995 extern _Float64 powf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __powf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__));
2996extern _Float64 sqrtf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __sqrtf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
2997extern _Float64 hypotf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __hypotf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__));
2998extern _Float64 cbrtf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __cbrtf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
2999extern _Float64 ceilf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64 __ceilf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3000extern _Float64 fabsf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64 __fabsf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3001extern _Float64 floorf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64 __floorf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3002extern _Float64 fmodf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __fmodf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__));
3003extern _Float64 copysignf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64 __copysignf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3004extern _Float64 nanf64 (const char *__tagb) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __nanf64 (const char *__tagb) __attribute__ ((__nothrow__ , __leaf__));
3005extern _Float64 j0f64 (_Float64) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __j0f64 (_Float64) __attribute__ ((__nothrow__ , __leaf__));
3006extern _Float64 j1f64 (_Float64) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __j1f64 (_Float64) __attribute__ ((__nothrow__ , __leaf__));
3007extern _Float64 jnf64 (int, _Float64) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __jnf64 (int, _Float64) __attribute__ ((__nothrow__ , __leaf__));
3008extern _Float64 y0f64 (_Float64) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __y0f64 (_Float64) __attribute__ ((__nothrow__ , __leaf__));
3009extern _Float64 y1f64 (_Float64) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __y1f64 (_Float64) __attribute__ ((__nothrow__ , __leaf__));
3010extern _Float64 ynf64 (int, _Float64) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __ynf64 (int, _Float64) __attribute__ ((__nothrow__ , __leaf__));
3011extern _Float64 erff64 (_Float64) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __erff64 (_Float64) __attribute__ ((__nothrow__ , __leaf__));
3012extern _Float64 erfcf64 (_Float64) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __erfcf64 (_Float64) __attribute__ ((__nothrow__ , __leaf__));
3013extern _Float64 lgammaf64 (_Float64) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __lgammaf64 (_Float64) __attribute__ ((__nothrow__ , __leaf__));
3014extern _Float64 tgammaf64 (_Float64) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __tgammaf64 (_Float64) __attribute__ ((__nothrow__ , __leaf__));
3015extern _Float64 lgammaf64_r (_Float64, int *__signgamp) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __lgammaf64_r (_Float64, int *__signgamp) __attribute__ ((__nothrow__ , __leaf__));
3016extern _Float64 rintf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __rintf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
3017extern _Float64 nextafterf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __nextafterf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__));
3018extern _Float64 nextdownf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __nextdownf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
3019extern _Float64 nextupf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __nextupf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
3020extern _Float64 remainderf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __remainderf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__));
3021extern _Float64 scalbnf64 (_Float64 __x, int __n) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __scalbnf64 (_Float64 __x, int __n) __attribute__ ((__nothrow__ , __leaf__));
3022extern int ilogbf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern int __ilogbf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
3023extern long int llogbf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __llogbf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
3024extern _Float64 scalblnf64 (_Float64 __x, long int __n) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __scalblnf64 (_Float64 __x, long int __n) __attribute__ ((__nothrow__ , __leaf__));
3025extern _Float64 nearbyintf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __nearbyintf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
3026extern _Float64 roundf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64 __roundf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3027extern _Float64 truncf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64 __truncf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3028extern _Float64 remquof64 (_Float64 __x, _Float64 __y, int *__quo) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __remquof64 (_Float64 __x, _Float64 __y, int *__quo) __attribute__ ((__nothrow__ , __leaf__));
3029extern long int lrintf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __lrintf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
3030__extension__
3031extern long long int llrintf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern long long int __llrintf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
3032extern long int lroundf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __lroundf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
3033__extension__
3034extern long long int llroundf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)); extern long long int __llroundf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__));
3035extern _Float64 fdimf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __fdimf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__));
3036extern _Float64 fmaxf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64 __fmaxf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3037extern _Float64 fminf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64 __fminf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3038extern _Float64 fmaf64 (_Float64 __x, _Float64 __y, _Float64 __z) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __fmaf64 (_Float64 __x, _Float64 __y, _Float64 __z) __attribute__ ((__nothrow__ , __leaf__));
3039extern _Float64 roundevenf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64 __roundevenf64 (_Float64 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3040extern __intmax_t fromfpf64 (_Float64 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __intmax_t __fromfpf64 (_Float64 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
3041extern __uintmax_t ufromfpf64 (_Float64 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __uintmax_t __ufromfpf64 (_Float64 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
3042extern __intmax_t fromfpxf64 (_Float64 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __intmax_t __fromfpxf64 (_Float64 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
3043extern __uintmax_t ufromfpxf64 (_Float64 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __uintmax_t __ufromfpxf64 (_Float64 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
3044extern _Float64 fmaxmagf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64 __fmaxmagf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3045extern _Float64 fminmagf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64 __fminmagf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3046extern int totalorderf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__))
3047 __attribute__ ((__const__));
3048extern int totalordermagf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__))
3049 __attribute__ ((__const__));
3050extern int canonicalizef64 (_Float64 *__cx, const _Float64 *__x) __attribute__ ((__nothrow__ , __leaf__));
3051extern _Float64 getpayloadf64 (const _Float64 *__x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64 __getpayloadf64 (const _Float64 *__x) __attribute__ ((__nothrow__ , __leaf__));
3052extern int setpayloadf64 (_Float64 *__x, _Float64 __payload) __attribute__ ((__nothrow__ , __leaf__));
3053extern int setpayloadsigf64 (_Float64 *__x, _Float64 __payload) __attribute__ ((__nothrow__ , __leaf__));
3054extern int __fpclassifyf128 (_Float128 __value) __attribute__ ((__nothrow__ , __leaf__))
3055 __attribute__ ((__const__));
3056extern int __signbitf128 (_Float128 __value) __attribute__ ((__nothrow__ , __leaf__))
3057 __attribute__ ((__const__));
3058extern int __isinff128 (_Float128 __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3059extern int __finitef128 (_Float128 __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3060extern int __isnanf128 (_Float128 __value) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3061extern int __iseqsigf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__));
3062extern int __issignalingf128 (_Float128 __value) __attribute__ ((__nothrow__ , __leaf__))
3063 __attribute__ ((__const__));
3064extern _Float128 acosf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __acosf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3065extern _Float128 asinf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __asinf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3066extern _Float128 atanf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __atanf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3067extern _Float128 atan2f128 (_Float128 __y, _Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __atan2f128 (_Float128 __y, _Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3068 extern _Float128 cosf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __cosf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3069 extern _Float128 sinf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __sinf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3070extern _Float128 tanf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __tanf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3071extern _Float128 coshf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __coshf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3072extern _Float128 sinhf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __sinhf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3073extern _Float128 tanhf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __tanhf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3074 extern void sincosf128 (_Float128 __x, _Float128 *__sinx, _Float128 *__cosx) __attribute__ ((__nothrow__ , __leaf__)); extern void __sincosf128 (_Float128 __x, _Float128 *__sinx, _Float128 *__cosx) __attribute__ ((__nothrow__ , __leaf__));
3075extern _Float128 acoshf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __acoshf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3076extern _Float128 asinhf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __asinhf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3077extern _Float128 atanhf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __atanhf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3078 extern _Float128 expf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __expf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3079extern _Float128 frexpf128 (_Float128 __x, int *__exponent) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __frexpf128 (_Float128 __x, int *__exponent) __attribute__ ((__nothrow__ , __leaf__));
3080extern _Float128 ldexpf128 (_Float128 __x, int __exponent) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __ldexpf128 (_Float128 __x, int __exponent) __attribute__ ((__nothrow__ , __leaf__));
3081 extern _Float128 logf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __logf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3082extern _Float128 log10f128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __log10f128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3083extern _Float128 modff128 (_Float128 __x, _Float128 *__iptr) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __modff128 (_Float128 __x, _Float128 *__iptr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
3084extern _Float128 exp10f128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __exp10f128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3085extern _Float128 expm1f128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __expm1f128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3086extern _Float128 log1pf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __log1pf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3087extern _Float128 logbf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __logbf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3088extern _Float128 exp2f128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __exp2f128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3089extern _Float128 log2f128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __log2f128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3090 extern _Float128 powf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __powf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__));
3091extern _Float128 sqrtf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __sqrtf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3092extern _Float128 hypotf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __hypotf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__));
3093extern _Float128 cbrtf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __cbrtf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3094extern _Float128 ceilf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float128 __ceilf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3095extern _Float128 fabsf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float128 __fabsf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3096extern _Float128 floorf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float128 __floorf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3097extern _Float128 fmodf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __fmodf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__));
3098extern _Float128 copysignf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float128 __copysignf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3099extern _Float128 nanf128 (const char *__tagb) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __nanf128 (const char *__tagb) __attribute__ ((__nothrow__ , __leaf__));
3100extern _Float128 j0f128 (_Float128) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __j0f128 (_Float128) __attribute__ ((__nothrow__ , __leaf__));
3101extern _Float128 j1f128 (_Float128) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __j1f128 (_Float128) __attribute__ ((__nothrow__ , __leaf__));
3102extern _Float128 jnf128 (int, _Float128) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __jnf128 (int, _Float128) __attribute__ ((__nothrow__ , __leaf__));
3103extern _Float128 y0f128 (_Float128) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __y0f128 (_Float128) __attribute__ ((__nothrow__ , __leaf__));
3104extern _Float128 y1f128 (_Float128) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __y1f128 (_Float128) __attribute__ ((__nothrow__ , __leaf__));
3105extern _Float128 ynf128 (int, _Float128) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __ynf128 (int, _Float128) __attribute__ ((__nothrow__ , __leaf__));
3106extern _Float128 erff128 (_Float128) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __erff128 (_Float128) __attribute__ ((__nothrow__ , __leaf__));
3107extern _Float128 erfcf128 (_Float128) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __erfcf128 (_Float128) __attribute__ ((__nothrow__ , __leaf__));
3108extern _Float128 lgammaf128 (_Float128) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __lgammaf128 (_Float128) __attribute__ ((__nothrow__ , __leaf__));
3109extern _Float128 tgammaf128 (_Float128) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __tgammaf128 (_Float128) __attribute__ ((__nothrow__ , __leaf__));
3110extern _Float128 lgammaf128_r (_Float128, int *__signgamp) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __lgammaf128_r (_Float128, int *__signgamp) __attribute__ ((__nothrow__ , __leaf__));
3111extern _Float128 rintf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __rintf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3112extern _Float128 nextafterf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __nextafterf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__));
3113extern _Float128 nextdownf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __nextdownf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3114extern _Float128 nextupf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __nextupf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3115extern _Float128 remainderf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __remainderf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__));
3116extern _Float128 scalbnf128 (_Float128 __x, int __n) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __scalbnf128 (_Float128 __x, int __n) __attribute__ ((__nothrow__ , __leaf__));
3117extern int ilogbf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern int __ilogbf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3118extern long int llogbf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __llogbf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3119extern _Float128 scalblnf128 (_Float128 __x, long int __n) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __scalblnf128 (_Float128 __x, long int __n) __attribute__ ((__nothrow__ , __leaf__));
3120extern _Float128 nearbyintf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __nearbyintf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3121extern _Float128 roundf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float128 __roundf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3122extern _Float128 truncf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float128 __truncf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3123extern _Float128 remquof128 (_Float128 __x, _Float128 __y, int *__quo) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __remquof128 (_Float128 __x, _Float128 __y, int *__quo) __attribute__ ((__nothrow__ , __leaf__));
3124extern long int lrintf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __lrintf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3125__extension__
3126extern long long int llrintf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern long long int __llrintf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3127extern long int lroundf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __lroundf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3128__extension__
3129extern long long int llroundf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)); extern long long int __llroundf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__));
3130extern _Float128 fdimf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __fdimf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__));
3131extern _Float128 fmaxf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float128 __fmaxf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3132extern _Float128 fminf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float128 __fminf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3133extern _Float128 fmaf128 (_Float128 __x, _Float128 __y, _Float128 __z) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __fmaf128 (_Float128 __x, _Float128 __y, _Float128 __z) __attribute__ ((__nothrow__ , __leaf__));
3134extern _Float128 roundevenf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float128 __roundevenf128 (_Float128 __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3135extern __intmax_t fromfpf128 (_Float128 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __intmax_t __fromfpf128 (_Float128 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
3136extern __uintmax_t ufromfpf128 (_Float128 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __uintmax_t __ufromfpf128 (_Float128 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
3137extern __intmax_t fromfpxf128 (_Float128 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __intmax_t __fromfpxf128 (_Float128 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
3138extern __uintmax_t ufromfpxf128 (_Float128 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __uintmax_t __ufromfpxf128 (_Float128 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
3139extern _Float128 fmaxmagf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float128 __fmaxmagf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3140extern _Float128 fminmagf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float128 __fminmagf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3141extern int totalorderf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__))
3142 __attribute__ ((__const__));
3143extern int totalordermagf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__))
3144 __attribute__ ((__const__));
3145extern int canonicalizef128 (_Float128 *__cx, const _Float128 *__x) __attribute__ ((__nothrow__ , __leaf__));
3146extern _Float128 getpayloadf128 (const _Float128 *__x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float128 __getpayloadf128 (const _Float128 *__x) __attribute__ ((__nothrow__ , __leaf__));
3147extern int setpayloadf128 (_Float128 *__x, _Float128 __payload) __attribute__ ((__nothrow__ , __leaf__));
3148extern int setpayloadsigf128 (_Float128 *__x, _Float128 __payload) __attribute__ ((__nothrow__ , __leaf__));
3149extern _Float32x acosf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __acosf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3150extern _Float32x asinf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __asinf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3151extern _Float32x atanf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __atanf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3152extern _Float32x atan2f32x (_Float32x __y, _Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __atan2f32x (_Float32x __y, _Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3153 extern _Float32x cosf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __cosf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3154 extern _Float32x sinf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __sinf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3155extern _Float32x tanf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __tanf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3156extern _Float32x coshf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __coshf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3157extern _Float32x sinhf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __sinhf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3158extern _Float32x tanhf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __tanhf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3159 extern void sincosf32x (_Float32x __x, _Float32x *__sinx, _Float32x *__cosx) __attribute__ ((__nothrow__ , __leaf__)); extern void __sincosf32x (_Float32x __x, _Float32x *__sinx, _Float32x *__cosx) __attribute__ ((__nothrow__ , __leaf__));
3160extern _Float32x acoshf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __acoshf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3161extern _Float32x asinhf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __asinhf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3162extern _Float32x atanhf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __atanhf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3163 extern _Float32x expf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __expf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3164extern _Float32x frexpf32x (_Float32x __x, int *__exponent) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __frexpf32x (_Float32x __x, int *__exponent) __attribute__ ((__nothrow__ , __leaf__));
3165extern _Float32x ldexpf32x (_Float32x __x, int __exponent) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __ldexpf32x (_Float32x __x, int __exponent) __attribute__ ((__nothrow__ , __leaf__));
3166 extern _Float32x logf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __logf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3167extern _Float32x log10f32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __log10f32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3168extern _Float32x modff32x (_Float32x __x, _Float32x *__iptr) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __modff32x (_Float32x __x, _Float32x *__iptr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
3169extern _Float32x exp10f32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __exp10f32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3170extern _Float32x expm1f32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __expm1f32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3171extern _Float32x log1pf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __log1pf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3172extern _Float32x logbf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __logbf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3173extern _Float32x exp2f32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __exp2f32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3174extern _Float32x log2f32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __log2f32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3175 extern _Float32x powf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __powf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__));
3176extern _Float32x sqrtf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __sqrtf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3177extern _Float32x hypotf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __hypotf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__));
3178extern _Float32x cbrtf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __cbrtf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3179extern _Float32x ceilf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32x __ceilf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3180extern _Float32x fabsf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32x __fabsf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3181extern _Float32x floorf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32x __floorf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3182extern _Float32x fmodf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __fmodf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__));
3183extern _Float32x copysignf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32x __copysignf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3184extern _Float32x nanf32x (const char *__tagb) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __nanf32x (const char *__tagb) __attribute__ ((__nothrow__ , __leaf__));
3185extern _Float32x j0f32x (_Float32x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __j0f32x (_Float32x) __attribute__ ((__nothrow__ , __leaf__));
3186extern _Float32x j1f32x (_Float32x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __j1f32x (_Float32x) __attribute__ ((__nothrow__ , __leaf__));
3187extern _Float32x jnf32x (int, _Float32x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __jnf32x (int, _Float32x) __attribute__ ((__nothrow__ , __leaf__));
3188extern _Float32x y0f32x (_Float32x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __y0f32x (_Float32x) __attribute__ ((__nothrow__ , __leaf__));
3189extern _Float32x y1f32x (_Float32x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __y1f32x (_Float32x) __attribute__ ((__nothrow__ , __leaf__));
3190extern _Float32x ynf32x (int, _Float32x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __ynf32x (int, _Float32x) __attribute__ ((__nothrow__ , __leaf__));
3191extern _Float32x erff32x (_Float32x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __erff32x (_Float32x) __attribute__ ((__nothrow__ , __leaf__));
3192extern _Float32x erfcf32x (_Float32x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __erfcf32x (_Float32x) __attribute__ ((__nothrow__ , __leaf__));
3193extern _Float32x lgammaf32x (_Float32x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __lgammaf32x (_Float32x) __attribute__ ((__nothrow__ , __leaf__));
3194extern _Float32x tgammaf32x (_Float32x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __tgammaf32x (_Float32x) __attribute__ ((__nothrow__ , __leaf__));
3195extern _Float32x lgammaf32x_r (_Float32x, int *__signgamp) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __lgammaf32x_r (_Float32x, int *__signgamp) __attribute__ ((__nothrow__ , __leaf__));
3196extern _Float32x rintf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __rintf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3197extern _Float32x nextafterf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __nextafterf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__));
3198extern _Float32x nextdownf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __nextdownf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3199extern _Float32x nextupf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __nextupf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3200extern _Float32x remainderf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __remainderf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__));
3201extern _Float32x scalbnf32x (_Float32x __x, int __n) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __scalbnf32x (_Float32x __x, int __n) __attribute__ ((__nothrow__ , __leaf__));
3202extern int ilogbf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern int __ilogbf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3203extern long int llogbf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __llogbf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3204extern _Float32x scalblnf32x (_Float32x __x, long int __n) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __scalblnf32x (_Float32x __x, long int __n) __attribute__ ((__nothrow__ , __leaf__));
3205extern _Float32x nearbyintf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __nearbyintf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3206extern _Float32x roundf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32x __roundf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3207extern _Float32x truncf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32x __truncf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3208extern _Float32x remquof32x (_Float32x __x, _Float32x __y, int *__quo) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __remquof32x (_Float32x __x, _Float32x __y, int *__quo) __attribute__ ((__nothrow__ , __leaf__));
3209extern long int lrintf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __lrintf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3210__extension__
3211extern long long int llrintf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern long long int __llrintf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3212extern long int lroundf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __lroundf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3213__extension__
3214extern long long int llroundf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)); extern long long int __llroundf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__));
3215extern _Float32x fdimf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __fdimf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__));
3216extern _Float32x fmaxf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32x __fmaxf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3217extern _Float32x fminf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32x __fminf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3218extern _Float32x fmaf32x (_Float32x __x, _Float32x __y, _Float32x __z) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __fmaf32x (_Float32x __x, _Float32x __y, _Float32x __z) __attribute__ ((__nothrow__ , __leaf__));
3219extern _Float32x roundevenf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32x __roundevenf32x (_Float32x __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3220extern __intmax_t fromfpf32x (_Float32x __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __intmax_t __fromfpf32x (_Float32x __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
3221extern __uintmax_t ufromfpf32x (_Float32x __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __uintmax_t __ufromfpf32x (_Float32x __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
3222extern __intmax_t fromfpxf32x (_Float32x __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __intmax_t __fromfpxf32x (_Float32x __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
3223extern __uintmax_t ufromfpxf32x (_Float32x __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __uintmax_t __ufromfpxf32x (_Float32x __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
3224extern _Float32x fmaxmagf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32x __fmaxmagf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3225extern _Float32x fminmagf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float32x __fminmagf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3226extern int totalorderf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__))
3227 __attribute__ ((__const__));
3228extern int totalordermagf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__))
3229 __attribute__ ((__const__));
3230extern int canonicalizef32x (_Float32x *__cx, const _Float32x *__x) __attribute__ ((__nothrow__ , __leaf__));
3231extern _Float32x getpayloadf32x (const _Float32x *__x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float32x __getpayloadf32x (const _Float32x *__x) __attribute__ ((__nothrow__ , __leaf__));
3232extern int setpayloadf32x (_Float32x *__x, _Float32x __payload) __attribute__ ((__nothrow__ , __leaf__));
3233extern int setpayloadsigf32x (_Float32x *__x, _Float32x __payload) __attribute__ ((__nothrow__ , __leaf__));
3234extern _Float64x acosf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __acosf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3235extern _Float64x asinf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __asinf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3236extern _Float64x atanf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __atanf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3237extern _Float64x atan2f64x (_Float64x __y, _Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __atan2f64x (_Float64x __y, _Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3238 extern _Float64x cosf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __cosf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3239 extern _Float64x sinf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __sinf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3240extern _Float64x tanf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __tanf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3241extern _Float64x coshf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __coshf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3242extern _Float64x sinhf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __sinhf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3243extern _Float64x tanhf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __tanhf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3244 extern void sincosf64x (_Float64x __x, _Float64x *__sinx, _Float64x *__cosx) __attribute__ ((__nothrow__ , __leaf__)); extern void __sincosf64x (_Float64x __x, _Float64x *__sinx, _Float64x *__cosx) __attribute__ ((__nothrow__ , __leaf__));
3245extern _Float64x acoshf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __acoshf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3246extern _Float64x asinhf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __asinhf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3247extern _Float64x atanhf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __atanhf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3248 extern _Float64x expf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __expf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3249extern _Float64x frexpf64x (_Float64x __x, int *__exponent) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __frexpf64x (_Float64x __x, int *__exponent) __attribute__ ((__nothrow__ , __leaf__));
3250extern _Float64x ldexpf64x (_Float64x __x, int __exponent) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __ldexpf64x (_Float64x __x, int __exponent) __attribute__ ((__nothrow__ , __leaf__));
3251 extern _Float64x logf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __logf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3252extern _Float64x log10f64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __log10f64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3253extern _Float64x modff64x (_Float64x __x, _Float64x *__iptr) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __modff64x (_Float64x __x, _Float64x *__iptr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
3254extern _Float64x exp10f64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __exp10f64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3255extern _Float64x expm1f64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __expm1f64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3256extern _Float64x log1pf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __log1pf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3257extern _Float64x logbf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __logbf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3258extern _Float64x exp2f64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __exp2f64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3259extern _Float64x log2f64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __log2f64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3260 extern _Float64x powf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __powf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__));
3261extern _Float64x sqrtf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __sqrtf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3262extern _Float64x hypotf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __hypotf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__));
3263extern _Float64x cbrtf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __cbrtf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3264extern _Float64x ceilf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64x __ceilf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3265extern _Float64x fabsf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64x __fabsf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3266extern _Float64x floorf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64x __floorf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3267extern _Float64x fmodf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __fmodf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__));
3268extern _Float64x copysignf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64x __copysignf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3269extern _Float64x nanf64x (const char *__tagb) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __nanf64x (const char *__tagb) __attribute__ ((__nothrow__ , __leaf__));
3270extern _Float64x j0f64x (_Float64x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __j0f64x (_Float64x) __attribute__ ((__nothrow__ , __leaf__));
3271extern _Float64x j1f64x (_Float64x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __j1f64x (_Float64x) __attribute__ ((__nothrow__ , __leaf__));
3272extern _Float64x jnf64x (int, _Float64x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __jnf64x (int, _Float64x) __attribute__ ((__nothrow__ , __leaf__));
3273extern _Float64x y0f64x (_Float64x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __y0f64x (_Float64x) __attribute__ ((__nothrow__ , __leaf__));
3274extern _Float64x y1f64x (_Float64x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __y1f64x (_Float64x) __attribute__ ((__nothrow__ , __leaf__));
3275extern _Float64x ynf64x (int, _Float64x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __ynf64x (int, _Float64x) __attribute__ ((__nothrow__ , __leaf__));
3276extern _Float64x erff64x (_Float64x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __erff64x (_Float64x) __attribute__ ((__nothrow__ , __leaf__));
3277extern _Float64x erfcf64x (_Float64x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __erfcf64x (_Float64x) __attribute__ ((__nothrow__ , __leaf__));
3278extern _Float64x lgammaf64x (_Float64x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __lgammaf64x (_Float64x) __attribute__ ((__nothrow__ , __leaf__));
3279extern _Float64x tgammaf64x (_Float64x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __tgammaf64x (_Float64x) __attribute__ ((__nothrow__ , __leaf__));
3280extern _Float64x lgammaf64x_r (_Float64x, int *__signgamp) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __lgammaf64x_r (_Float64x, int *__signgamp) __attribute__ ((__nothrow__ , __leaf__));
3281extern _Float64x rintf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __rintf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3282extern _Float64x nextafterf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __nextafterf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__));
3283extern _Float64x nextdownf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __nextdownf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3284extern _Float64x nextupf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __nextupf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3285extern _Float64x remainderf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __remainderf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__));
3286extern _Float64x scalbnf64x (_Float64x __x, int __n) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __scalbnf64x (_Float64x __x, int __n) __attribute__ ((__nothrow__ , __leaf__));
3287extern int ilogbf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern int __ilogbf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3288extern long int llogbf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __llogbf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3289extern _Float64x scalblnf64x (_Float64x __x, long int __n) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __scalblnf64x (_Float64x __x, long int __n) __attribute__ ((__nothrow__ , __leaf__));
3290extern _Float64x nearbyintf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __nearbyintf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3291extern _Float64x roundf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64x __roundf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3292extern _Float64x truncf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64x __truncf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3293extern _Float64x remquof64x (_Float64x __x, _Float64x __y, int *__quo) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __remquof64x (_Float64x __x, _Float64x __y, int *__quo) __attribute__ ((__nothrow__ , __leaf__));
3294extern long int lrintf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __lrintf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3295__extension__
3296extern long long int llrintf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern long long int __llrintf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3297extern long int lroundf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern long int __lroundf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3298__extension__
3299extern long long int llroundf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)); extern long long int __llroundf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__));
3300extern _Float64x fdimf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __fdimf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__));
3301extern _Float64x fmaxf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64x __fmaxf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3302extern _Float64x fminf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64x __fminf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3303extern _Float64x fmaf64x (_Float64x __x, _Float64x __y, _Float64x __z) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __fmaf64x (_Float64x __x, _Float64x __y, _Float64x __z) __attribute__ ((__nothrow__ , __leaf__));
3304extern _Float64x roundevenf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64x __roundevenf64x (_Float64x __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3305extern __intmax_t fromfpf64x (_Float64x __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __intmax_t __fromfpf64x (_Float64x __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
3306extern __uintmax_t ufromfpf64x (_Float64x __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __uintmax_t __ufromfpf64x (_Float64x __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
3307extern __intmax_t fromfpxf64x (_Float64x __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __intmax_t __fromfpxf64x (_Float64x __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
3308extern __uintmax_t ufromfpxf64x (_Float64x __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__)); extern __uintmax_t __ufromfpxf64x (_Float64x __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ , __leaf__));
3309extern _Float64x fmaxmagf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64x __fmaxmagf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3310extern _Float64x fminmagf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)); extern _Float64x __fminmagf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3311extern int totalorderf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__))
3312 __attribute__ ((__const__));
3313extern int totalordermagf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__))
3314 __attribute__ ((__const__));
3315extern int canonicalizef64x (_Float64x *__cx, const _Float64x *__x) __attribute__ ((__nothrow__ , __leaf__));
3316extern _Float64x getpayloadf64x (const _Float64x *__x) __attribute__ ((__nothrow__ , __leaf__)); extern _Float64x __getpayloadf64x (const _Float64x *__x) __attribute__ ((__nothrow__ , __leaf__));
3317extern int setpayloadf64x (_Float64x *__x, _Float64x __payload) __attribute__ ((__nothrow__ , __leaf__));
3318extern int setpayloadsigf64x (_Float64x *__x, _Float64x __payload) __attribute__ ((__nothrow__ , __leaf__));
3319extern float fadd (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__));
3320extern float fdiv (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__));
3321extern float fmul (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__));
3322extern float fsub (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__));
3323extern float faddl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__));
3324extern float fdivl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__));
3325extern float fmull (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__));
3326extern float fsubl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__));
3327extern double daddl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__));
3328extern double ddivl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__));
3329extern double dmull (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__));
3330extern double dsubl (long double __x, long double __y) __attribute__ ((__nothrow__ , __leaf__));
3331extern _Float32 f32addf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__));
3332extern _Float32 f32divf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__));
3333extern _Float32 f32mulf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__));
3334extern _Float32 f32subf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ , __leaf__));
3335extern _Float32 f32addf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__));
3336extern _Float32 f32divf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__));
3337extern _Float32 f32mulf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__));
3338extern _Float32 f32subf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__));
3339extern _Float32 f32addf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__));
3340extern _Float32 f32divf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__));
3341extern _Float32 f32mulf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__));
3342extern _Float32 f32subf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__));
3343extern _Float32 f32addf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__));
3344extern _Float32 f32divf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__));
3345extern _Float32 f32mulf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__));
3346extern _Float32 f32subf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__));
3347extern _Float32x f32xaddf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__));
3348extern _Float32x f32xdivf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__));
3349extern _Float32x f32xmulf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__));
3350extern _Float32x f32xsubf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ , __leaf__));
3351extern _Float32x f32xaddf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__));
3352extern _Float32x f32xdivf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__));
3353extern _Float32x f32xmulf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__));
3354extern _Float32x f32xsubf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__));
3355extern _Float32x f32xaddf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__));
3356extern _Float32x f32xdivf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__));
3357extern _Float32x f32xmulf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__));
3358extern _Float32x f32xsubf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__));
3359extern _Float64 f64addf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__));
3360extern _Float64 f64divf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__));
3361extern _Float64 f64mulf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__));
3362extern _Float64 f64subf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ , __leaf__));
3363extern _Float64 f64addf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__));
3364extern _Float64 f64divf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__));
3365extern _Float64 f64mulf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__));
3366extern _Float64 f64subf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__));
3367extern _Float64x f64xaddf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__));
3368extern _Float64x f64xdivf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__));
3369extern _Float64x f64xmulf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__));
3370extern _Float64x f64xsubf128 (_Float128 __x, _Float128 __y) __attribute__ ((__nothrow__ , __leaf__));
3371extern int signgam;
3372enum
3373 {
3374 FP_NAN =
3375 0,
3376 FP_INFINITE =
3377 1,
3378 FP_ZERO =
3379 2,
3380 FP_SUBNORMAL =
3381 3,
3382 FP_NORMAL =
3383 4
3384 };
3385extern int __iscanonicall (long double __x)
3386 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
3387
3388
3389
3390extern size_t strlcpy(char *, const char*, size_t);
3391extern size_t strlcat(char *, const char*, size_t);
3392extern void setproctitle(const char *fmt, ...);
3393
3394
3395
3396
3397void *ruby_xmalloc(size_t) __attribute__((__malloc__)) __attribute__((__returns_nonnull__)) __attribute__ ((alloc_size (1)));
3398void *ruby_xmalloc2(size_t,size_t) __attribute__((__malloc__)) __attribute__((__returns_nonnull__)) __attribute__ ((alloc_size (1,2)));
3399void *ruby_xcalloc(size_t,size_t) __attribute__((__malloc__)) __attribute__((__returns_nonnull__)) __attribute__ ((alloc_size (1,2)));
3400void *ruby_xrealloc(void*,size_t) __attribute__((__returns_nonnull__)) __attribute__ ((alloc_size (2)));
3401void *ruby_xrealloc2(void*,size_t,size_t) __attribute__((__returns_nonnull__)) __attribute__ ((alloc_size (2,3)));
3402void ruby_xfree(void*);
3403
3404
3405__attribute__ ((__noreturn__)) void rb_assert_failure(const char *, int, const char *, const char *);
3406
3407
3408typedef unsigned long VALUE;
3409typedef unsigned long ID;
3410typedef char ruby_check_sizeof_int[4 == sizeof(int) ? 1 : -1];
3411typedef char ruby_check_sizeof_long[8 == sizeof(long) ? 1 : -1];
3412typedef char ruby_check_sizeof_long_long[8 == sizeof(long long) ? 1 : -1];
3413typedef char ruby_check_sizeof_voidp[8 == sizeof(void*) ? 1 : -1];
3414VALUE rb_int2inum(intptr_t);
3415VALUE rb_uint2inum(uintptr_t);
3416VALUE rb_ll2inum(long long);
3417VALUE rb_ull2inum(unsigned long long);
3418__attribute__ ((__noreturn__)) void rb_out_of_int(long num);
3419static inline int
3420rb_long2int_inline(long n)
3421{
3422 int i = (int)n;
3423 if ((long)i != n)
3424 rb_out_of_int(n);
3425 return i;
3426}
3427static inline long
3428rb_fix2long(VALUE x)
3429{
3430 return ((long)(((long)(x))>>(int)(1)));
3431}
3432static inline unsigned long
3433rb_fix2ulong(VALUE x)
3434{
3435 return ((unsigned long)((long)(((long)(x))>>(int)(1))));
3436}
3437ID rb_sym2id(VALUE);
3438VALUE rb_id2sym(ID);
3439enum ruby_special_consts {
3440 RUBY_Qfalse = 0x00,
3441 RUBY_Qtrue = 0x14,
3442 RUBY_Qnil = 0x08,
3443 RUBY_Qundef = 0x34,
3444 RUBY_IMMEDIATE_MASK = 0x07,
3445 RUBY_FIXNUM_FLAG = 0x01,
3446 RUBY_FLONUM_MASK = 0x03,
3447 RUBY_FLONUM_FLAG = 0x02,
3448 RUBY_SYMBOL_FLAG = 0x0c,
3450};
3451enum ruby_value_type {
3452 RUBY_T_NONE = 0x00,
3453 RUBY_T_OBJECT = 0x01,
3454 RUBY_T_CLASS = 0x02,
3455 RUBY_T_MODULE = 0x03,
3456 RUBY_T_FLOAT = 0x04,
3457 RUBY_T_STRING = 0x05,
3458 RUBY_T_REGEXP = 0x06,
3459 RUBY_T_ARRAY = 0x07,
3460 RUBY_T_HASH = 0x08,
3461 RUBY_T_STRUCT = 0x09,
3462 RUBY_T_BIGNUM = 0x0a,
3463 RUBY_T_FILE = 0x0b,
3464 RUBY_T_DATA = 0x0c,
3465 RUBY_T_MATCH = 0x0d,
3466 RUBY_T_COMPLEX = 0x0e,
3467 RUBY_T_RATIONAL = 0x0f,
3468 RUBY_T_NIL = 0x11,
3469 RUBY_T_TRUE = 0x12,
3470 RUBY_T_FALSE = 0x13,
3471 RUBY_T_SYMBOL = 0x14,
3472 RUBY_T_FIXNUM = 0x15,
3473 RUBY_T_UNDEF = 0x16,
3474 RUBY_T_IMEMO = 0x1a,
3475 RUBY_T_NODE = 0x1b,
3476 RUBY_T_ICLASS = 0x1c,
3477 RUBY_T_ZOMBIE = 0x1d,
3478 RUBY_T_MOVED = 0x1e,
3479 RUBY_T_MASK = 0x1f
3480};
3481static inline int rb_type(VALUE obj);
3482void rb_check_type(VALUE,int);
3483VALUE rb_str_to_str(VALUE);
3484VALUE rb_string_value(volatile VALUE*);
3485char *rb_string_value_ptr(volatile VALUE*);
3486char *rb_string_value_cstr(volatile VALUE*);
3487void rb_check_safe_obj(VALUE);
3488void rb_check_safe_str(VALUE) __attribute__((error("rb_check_safe_str() and Check_SafeStr() are obsolete; use StringValue() instead")));
3489VALUE rb_str_export(VALUE);
3490VALUE rb_str_export_locale(VALUE);
3491VALUE rb_get_path(VALUE);
3492VALUE rb_get_path_no_checksafe(VALUE);
3493void rb_secure(int);
3494int rb_safe_level(void);
3495void rb_set_safe_level(int);
3496int ruby_safe_level_2_error(void) __attribute__((error("$SAFE=2 to 4 are obsolete")));
3497int ruby_safe_level_2_warning(void) __attribute__((const,warning("$SAFE=2 to 4 are obsolete")));
3498void rb_set_safe_level_force(int);
3499void rb_secure_update(VALUE);
3500__attribute__ ((__noreturn__)) void rb_insecure_operation(void);
3501VALUE rb_errinfo(void);
3502void rb_set_errinfo(VALUE);
3503long rb_num2long(VALUE);
3504unsigned long rb_num2ulong(VALUE);
3505static inline long
3506rb_num2long_inline(VALUE x)
3507{
3508 if ((((int)(long)(x))&RUBY_FIXNUM_FLAG))
3509 return ((long)(((long)(x))>>(int)(1)));
3510 else
3511 return rb_num2long(x);
3512}
3513static inline unsigned long
3514rb_num2ulong_inline(VALUE x)
3515{
3516 if ((((int)(long)(x))&RUBY_FIXNUM_FLAG))
3517 return ((unsigned long)((long)(((long)(x))>>(int)(1))));
3518 else
3519 return rb_num2ulong(x);
3520}
3521long rb_num2int(VALUE);
3522long rb_fix2int(VALUE);
3523static inline int
3524rb_num2int_inline(VALUE x)
3525{
3526 if ((((int)(long)(x))&RUBY_FIXNUM_FLAG))
3527 return (int)rb_fix2int(x);
3528 else
3529 return (int)rb_num2int(x);
3530}
3531unsigned long rb_num2uint(VALUE);
3532unsigned long rb_fix2uint(VALUE);
3533short rb_num2short(VALUE);
3534unsigned short rb_num2ushort(VALUE);
3535short rb_fix2short(VALUE);
3536unsigned short rb_fix2ushort(VALUE);
3537static inline short
3538rb_num2short_inline(VALUE x)
3539{
3540 if ((((int)(long)(x))&RUBY_FIXNUM_FLAG))
3541 return rb_fix2short(x);
3542 else
3543 return rb_num2short(x);
3544}
3545long long rb_num2ll(VALUE);
3546unsigned long long rb_num2ull(VALUE);
3547static inline long long
3548rb_num2ll_inline(VALUE x)
3549{
3550 if ((((int)(long)(x))&RUBY_FIXNUM_FLAG))
3551 return ((long)(((long)(x))>>(int)(1)));
3552 else
3553 return rb_num2ll(x);
3554}
3555double rb_num2dbl(VALUE);
3556VALUE rb_uint2big(uintptr_t);
3557VALUE rb_int2big(intptr_t);
3558VALUE rb_newobj(void);
3559VALUE rb_newobj_of(VALUE, VALUE);
3560VALUE rb_obj_setup(VALUE obj, VALUE klass, VALUE type);
3561__extension__
3562enum ruby_fl_type {
3563 RUBY_FL_WB_PROTECTED = (1<<5),
3564 RUBY_FL_PROMOTED0 = (1<<5),
3565 RUBY_FL_PROMOTED1 = (1<<6),
3567 RUBY_FL_FINALIZE = (1<<7),
3568 RUBY_FL_TAINT = (1<<8),
3570 RUBY_FL_SEEN_OBJ_ID = (1<<9),
3571 RUBY_FL_EXIVAR = (1<<10),
3572 RUBY_FL_FREEZE = (1<<11),
3573 RUBY_FL_USHIFT = 12,
3574 RUBY_FL_USER0 = (1<<(RUBY_FL_USHIFT+0)),
3575 RUBY_FL_USER1 = (1<<(RUBY_FL_USHIFT+1)),
3576 RUBY_FL_USER2 = (1<<(RUBY_FL_USHIFT+2)),
3577 RUBY_FL_USER3 = (1<<(RUBY_FL_USHIFT+3)),
3578 RUBY_FL_USER4 = (1<<(RUBY_FL_USHIFT+4)),
3579 RUBY_FL_USER5 = (1<<(RUBY_FL_USHIFT+5)),
3580 RUBY_FL_USER6 = (1<<(RUBY_FL_USHIFT+6)),
3581 RUBY_FL_USER7 = (1<<(RUBY_FL_USHIFT+7)),
3582 RUBY_FL_USER8 = (1<<(RUBY_FL_USHIFT+8)),
3583 RUBY_FL_USER9 = (1<<(RUBY_FL_USHIFT+9)),
3584 RUBY_FL_USER10 = (1<<(RUBY_FL_USHIFT+10)),
3585 RUBY_FL_USER11 = (1<<(RUBY_FL_USHIFT+11)),
3586 RUBY_FL_USER12 = (1<<(RUBY_FL_USHIFT+12)),
3587 RUBY_FL_USER13 = (1<<(RUBY_FL_USHIFT+13)),
3588 RUBY_FL_USER14 = (1<<(RUBY_FL_USHIFT+14)),
3589 RUBY_FL_USER15 = (1<<(RUBY_FL_USHIFT+15)),
3590 RUBY_FL_USER16 = (1<<(RUBY_FL_USHIFT+16)),
3591 RUBY_FL_USER17 = (1<<(RUBY_FL_USHIFT+17)),
3592 RUBY_FL_USER18 = (1<<(RUBY_FL_USHIFT+18)),
3593 RUBY_FL_USER19 = (1<<(RUBY_FL_USHIFT+19)),
3597};
3598struct __attribute__((__aligned__(8))) RBasic {
3599 VALUE flags;
3600 const VALUE klass;
3601};
3602VALUE rb_obj_hide(VALUE obj);
3603VALUE rb_obj_reveal(VALUE obj, VALUE klass);
3604enum ruby_rvalue_flags {
3606};
3607enum ruby_robject_flags {
3609 ROBJECT_EMBED = RUBY_FL_USER1,
3610 ROBJECT_ENUM_END
3611};
3612struct RObject {
3613 struct RBasic basic;
3614 union {
3615 struct {
3616 uint32_t numiv;
3617 VALUE *ivptr;
3618 void *iv_index_tbl;
3619 } heap;
3621 } as;
3622};
3623enum ruby_rmodule_flags {
3624 RMODULE_IS_OVERLAID = RUBY_FL_USER2,
3625 RMODULE_IS_REFINEMENT = RUBY_FL_USER3,
3626 RMODULE_INCLUDED_INTO_REFINEMENT = RUBY_FL_USER4,
3627 RMODULE_ENUM_END
3628};
3629__attribute__ ((__pure__)) double rb_float_value(VALUE);
3630VALUE rb_float_new(double);
3631VALUE rb_float_new_in_heap(double);
3632enum ruby_rstring_flags {
3633 RSTRING_NOEMBED = RUBY_FL_USER1,
3634 RSTRING_EMBED_LEN_MASK = (RUBY_FL_USER2|RUBY_FL_USER3|RUBY_FL_USER4|
3636 RSTRING_EMBED_LEN_SHIFT = (RUBY_FL_USHIFT+2),
3637 RSTRING_EMBED_LEN_MAX = (int)((sizeof(VALUE)*RVALUE_EMBED_LEN_MAX)/sizeof(char)-1),
3638 RSTRING_FSTR = RUBY_FL_USER17,
3639 RSTRING_ENUM_END
3640};
3641struct RString {
3642 struct RBasic basic;
3643 union {
3644 struct {
3645 long len;
3646 char *ptr;
3647 union {
3648 long capa;
3649 VALUE shared;
3650 } aux;
3651 } heap;
3652 char ary[RSTRING_EMBED_LEN_MAX + 1];
3653 } as;
3654};
3655enum ruby_rarray_flags {
3656 RARRAY_EMBED_LEN_MAX = RVALUE_EMBED_LEN_MAX,
3657 RARRAY_EMBED_FLAG = RUBY_FL_USER1,
3658 RARRAY_EMBED_LEN_MASK = (RUBY_FL_USER4|RUBY_FL_USER3),
3660 RARRAY_TRANSIENT_FLAG = RUBY_FL_USER13,
3661 RARRAY_ENUM_END
3662};
3663struct RArray {
3664 struct RBasic basic;
3665 union {
3666 struct {
3667 long len;
3668 union {
3669 long capa;
3670 const
3671 VALUE shared_root;
3672 } aux;
3673 const VALUE *ptr;
3674 } heap;
3675 const VALUE ary[RARRAY_EMBED_LEN_MAX];
3676 } as;
3677};
3678struct RRegexp {
3679 struct RBasic basic;
3680 struct re_pattern_buffer *ptr;
3681 const VALUE src;
3682 unsigned long usecnt;
3683};
3684size_t rb_hash_size_num(VALUE hash);
3685struct RFile {
3686 struct RBasic basic;
3687 struct rb_io_t *fptr;
3688};
3689struct RData {
3690 struct RBasic basic;
3691 void (*dmark)(void*);
3692 void (*dfree)(void*);
3693 void *data;
3694};
3695typedef struct rb_data_type_struct rb_data_type_t;
3696struct rb_data_type_struct {
3697 const char *wrap_struct_name;
3698 struct {
3699 void (*dmark)(void*);
3700 void (*dfree)(void*);
3701 size_t (*dsize)(const void *);
3702 void (*dcompact)(void*);
3703 void *reserved[1];
3704 } function;
3705 const rb_data_type_t *parent;
3706 void *data;
3707 VALUE flags;
3708};
3709struct RTypedData {
3710 struct RBasic basic;
3711 const rb_data_type_t *type;
3712 VALUE typed_flag;
3713 void *data;
3714};
3715typedef void (*RUBY_DATA_FUNC)(void*);
3718VALUE rb_data_typed_object_wrap(VALUE klass, void *datap, const rb_data_type_t *);
3719VALUE rb_data_typed_object_zalloc(VALUE klass, size_t size, const rb_data_type_t *type);
3720int rb_typeddata_inherited_p(const rb_data_type_t *child, const rb_data_type_t *parent);
3721int rb_typeddata_is_kind_of(VALUE, const rb_data_type_t *);
3722void *rb_check_typeddata(VALUE, const rb_data_type_t *);
3723int rb_big_sign(VALUE);
3724void rb_freeze_singleton_class(VALUE klass);
3725static inline void
3726rb_obj_freeze_inline(VALUE x)
3727{
3728 if ((!(((VALUE)(x) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(x) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(x))->flags & RUBY_T_MASK) != RUBY_T_NODE)) {
3729 (void)(((struct RBasic*)(x))->flags |= RUBY_FL_FREEZE);
3730 if ((((struct RBasic*)(x))->klass) && !(((struct RBasic*)(x))->flags & RUBY_FL_SINGLETON)) {
3731 rb_freeze_singleton_class(x);
3732 }
3733 }
3734}
3735static inline VALUE rb_data_object_wrap_warning(VALUE,void*,RUBY_DATA_FUNC,RUBY_DATA_FUNC) __attribute__((warning("untyped Data is unsafe; use TypedData instead")));
3736static inline void *rb_data_object_get_warning(VALUE) __attribute__((warning("untyped Data is unsafe; use TypedData instead")));
3737static inline VALUE
3738rb_data_object_wrap_warning(VALUE klass, void *ptr, RUBY_DATA_FUNC mark, RUBY_DATA_FUNC free)
3739{
3740 return rb_data_object_wrap(klass, ptr, mark, free);
3741}
3742static inline void *
3743rb_data_object_get(VALUE obj)
3744{
3745 rb_check_type((VALUE)(obj),(RUBY_T_DATA));
3746 return ((struct RData *)obj)->data;
3747}
3748static inline void *
3749rb_data_object_get_warning(VALUE obj)
3750{
3751 return rb_data_object_get(obj);
3752}
3753static inline VALUE
3754rb_data_object_make(VALUE klass, RUBY_DATA_FUNC mark_func, RUBY_DATA_FUNC free_func, void **datap, size_t size)
3755{
3756 VALUE result = rb_data_object_zalloc((klass), (size), (RUBY_DATA_FUNC)(mark_func), (RUBY_DATA_FUNC)(free_func)); (void)((*datap) = (void *)(((struct RData*)(result))->data));;
3757 return result;
3758}
3759static inline VALUE
3760rb_data_typed_object_make(VALUE klass, const rb_data_type_t *type, void **datap, size_t size)
3761{
3762 VALUE result = rb_data_typed_object_zalloc(klass, size, type); (void)((*datap) = (void *)(((struct RData*)(result))->data));;
3763 return result;
3764}
3765__attribute__ ((__deprecated__("by ""rb_data_object_wrap"))) static inline VALUE rb_data_object_alloc(VALUE,void*,RUBY_DATA_FUNC,RUBY_DATA_FUNC);
3766static inline VALUE
3767rb_data_object_alloc(VALUE klass, void *data, RUBY_DATA_FUNC dmark, RUBY_DATA_FUNC dfree)
3768{
3769 return rb_data_object_wrap(klass, data, dmark, dfree);
3770}
3771__attribute__ ((__deprecated__("by ""rb_data_typed_object_wrap"))) static inline VALUE rb_data_typed_object_alloc(VALUE,void*,const rb_data_type_t*);
3772static inline VALUE
3773rb_data_typed_object_alloc(VALUE klass, void *datap, const rb_data_type_t *type)
3774{
3775 return rb_data_typed_object_wrap(klass, datap, type);
3776}
3777void rb_gc_writebarrier(VALUE a, VALUE b);
3778void rb_gc_writebarrier_unprotect(VALUE obj);
3779static inline VALUE
3780rb_obj_wb_unprotect(VALUE x, const char *filename __attribute__ ((unused)), int line __attribute__ ((unused)))
3781{
3783 return x;
3784}
3785static inline VALUE
3786rb_obj_written(VALUE a, VALUE oldv __attribute__ ((unused)), VALUE b, const char *filename __attribute__ ((unused)), int line __attribute__ ((unused)))
3787{
3788 if (!(((VALUE)(b) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(b) & (VALUE)~((VALUE)RUBY_Qnil)) == 0))) {
3789 rb_gc_writebarrier(a, b);
3790 }
3791 return a;
3792}
3793static inline VALUE
3794rb_obj_write(VALUE a, VALUE *slot, VALUE b, const char *filename __attribute__ ((unused)), int line __attribute__ ((unused)))
3795{
3796 *slot = b;
3797 rb_obj_written(a, ((VALUE)RUBY_Qundef) , b, filename, line);
3798 return a;
3799}
3800static inline int
3801rb_integer_type_p(VALUE obj)
3802{
3803 return ((((int)(long)(obj))&RUBY_FIXNUM_FLAG) ||
3804 (!(((VALUE)(obj) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(obj) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) &&
3805 (int)(((struct RBasic*)(obj))->flags & RUBY_T_MASK) == RUBY_T_BIGNUM));
3806}
3807static inline VALUE
3808rb_long2num_inline(long v)
3809{
3810 if ((((v) < (0x7fffffffffffffffL>>1)+1) && ((v) >= (((long)(-0x7fffffffffffffffL - 1L))>>(int)(1)))))
3811 return (((VALUE)(v))<<1 | RUBY_FIXNUM_FLAG);
3812 else
3813 return rb_int2big(v);
3814}
3815static inline VALUE
3816rb_ulong2num_inline(unsigned long v)
3817{
3818 if (((v) < (0x7fffffffffffffffL>>1)+1))
3819 return (((VALUE)(v))<<1 | RUBY_FIXNUM_FLAG);
3820 else
3821 return rb_uint2big(v);
3822}
3823static inline char
3824rb_num2char_inline(VALUE x)
3825{
3826 if (( ((RUBY_T_STRING) == RUBY_T_FIXNUM) ? (((int)(long)(x))&RUBY_FIXNUM_FLAG) : ((RUBY_T_STRING) == RUBY_T_TRUE) ? ((x) == ((VALUE)RUBY_Qtrue)) : ((RUBY_T_STRING) == RUBY_T_FALSE) ? ((x) == ((VALUE)RUBY_Qfalse)) : ((RUBY_T_STRING) == RUBY_T_NIL) ? ((x) == ((VALUE)RUBY_Qnil)) : ((RUBY_T_STRING) == RUBY_T_UNDEF) ? ((x) == ((VALUE)RUBY_Qundef)) : ((RUBY_T_STRING) == RUBY_T_SYMBOL) ? ((((VALUE)(x)&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG)||(!(((VALUE)(x) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(x) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(x))->flags & RUBY_T_MASK) == (RUBY_T_SYMBOL))) : ((RUBY_T_STRING) == RUBY_T_FLOAT) ? ( ((((int)(long)(x))&RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG) || (!(((VALUE)(x) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(x) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(x))->flags & RUBY_T_MASK) == RUBY_T_FLOAT)) : (!(((VALUE)(x) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(x) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(x))->flags & RUBY_T_MASK) == (RUBY_T_STRING))) && ((!(((struct RBasic*)(x))->flags & RSTRING_NOEMBED) ? (long)((((struct RBasic*)(x))->flags >> RSTRING_EMBED_LEN_SHIFT) & (RSTRING_EMBED_LEN_MASK >> RSTRING_EMBED_LEN_SHIFT)) : ((struct RString*)(x))->as.heap.len)>=1))
3827 return (!(((struct RBasic*)(x))->flags & RSTRING_NOEMBED) ? ((struct RString*)(x))->as.ary : ((struct RString*)(x))->as.heap.ptr)[0];
3828 else
3829 return (char)(rb_num2int_inline(x) & 0xff);
3830}
3831void *rb_alloc_tmp_buffer(volatile VALUE *store, long len) __attribute__ ((alloc_size (2)));
3832void *rb_alloc_tmp_buffer_with_count(volatile VALUE *store, size_t len,size_t count) __attribute__ ((alloc_size (2,3)));
3833void rb_free_tmp_buffer(volatile VALUE *store);
3834__attribute__ ((__noreturn__)) void ruby_malloc_size_overflow(size_t, size_t);
3835static inline int
3836rb_mul_size_overflow(size_t a, size_t b, size_t max, size_t *c)
3837{
3838 __extension__
3839 unsigned __int128 c2 = (unsigned __int128)a * (unsigned __int128)b;
3840 if (c2 > max) return 1;
3841 *c = (size_t)c2;
3842 return 0;
3843}
3844static inline void *
3845rb_alloc_tmp_buffer2(volatile VALUE *store, long count, size_t elsize)
3846{
3847 size_t cnt = (size_t)count;
3848 if (elsize == sizeof(VALUE)) {
3849 if ((__builtin_expect(!!(cnt > 0x7fffffffffffffffL / sizeof(VALUE)), 0))) {
3850 ruby_malloc_size_overflow(cnt, elsize);
3851 }
3852 }
3853 else {
3854 size_t size, max = 0x7fffffffffffffffL - sizeof(VALUE) + 1;
3855 if ((__builtin_expect(!!(rb_mul_size_overflow(cnt, elsize, max, &size)), 0))) {
3856 ruby_malloc_size_overflow(cnt, elsize);
3857 }
3858 cnt = (size + sizeof(VALUE) - 1) / sizeof(VALUE);
3859 }
3860 return rb_alloc_tmp_buffer_with_count(store, cnt * sizeof(VALUE), cnt);
3861}
3862static inline void *
3863ruby_nonempty_memcpy(void *dest, const void *src, size_t n)
3864{
3865 return (n ? memcpy(dest, src, n) : dest);
3866}
3867void rb_obj_infect(VALUE victim, VALUE carrier);
3868typedef int ruby_glob_func(const char*,VALUE, void*);
3869void rb_glob(const char*,void(*)(const char*,VALUE,void*),VALUE);
3870int ruby_glob(const char*,int,ruby_glob_func*,VALUE);
3871int ruby_brace_glob(const char*,int,ruby_glob_func*,VALUE);
3872VALUE rb_define_class(const char*,VALUE);
3873VALUE rb_define_module(const char*);
3874VALUE rb_define_class_under(VALUE, const char*, VALUE);
3875VALUE rb_define_module_under(VALUE, const char*);
3876void rb_include_module(VALUE,VALUE);
3877void rb_extend_object(VALUE,VALUE);
3878void rb_prepend_module(VALUE,VALUE);
3879typedef VALUE rb_gvar_getter_t(ID id, VALUE *data);
3880typedef void rb_gvar_setter_t(VALUE val, ID id, VALUE *data);
3881typedef void rb_gvar_marker_t(VALUE *var);
3891__attribute__ ((__noreturn__)) rb_gvar_setter_t rb_gvar_readonly_setter;
3892void rb_define_variable(const char*,VALUE*);
3895void rb_define_readonly_variable(const char*,const VALUE*);
3896void rb_define_const(VALUE,const char*,VALUE);
3897void rb_define_global_const(const char*,VALUE);
3898void rb_define_method(VALUE,const char*,VALUE(*)(),int);
3899void rb_define_module_function(VALUE,const char*,VALUE(*)(),int);
3900void rb_define_global_function(const char*,VALUE(*)(),int);
3901void rb_undef_method(VALUE,const char*);
3902void rb_define_alias(VALUE,const char*,const char*);
3903void rb_define_attr(VALUE,const char*,int,int);
3904void rb_global_variable(VALUE*);
3905void rb_gc_register_mark_object(VALUE);
3906void rb_gc_register_address(VALUE*);
3907void rb_gc_unregister_address(VALUE*);
3908ID rb_intern(const char*);
3909ID rb_intern2(const char*, long);
3910ID rb_intern_str(VALUE str);
3911const char *rb_id2name(ID);
3912ID rb_check_id(volatile VALUE *);
3913ID rb_to_id(VALUE);
3914VALUE rb_id2str(ID);
3915VALUE rb_sym2str(VALUE);
3916VALUE rb_to_symbol(VALUE name);
3917VALUE rb_check_symbol(volatile VALUE *namep);
3918__attribute__ ((__error__ (" argument length doesn't match"))) int rb_varargs_bad_length(int,int);
3919const char *rb_class2name(VALUE);
3920const char *rb_obj_classname(VALUE);
3921void rb_p(VALUE);
3922VALUE rb_eval_string(const char*);
3923VALUE rb_eval_string_protect(const char*, int*);
3924VALUE rb_eval_string_wrap(const char*, int*);
3925VALUE rb_funcall(VALUE, ID, int, ...);
3926VALUE rb_funcallv(VALUE, ID, int, const VALUE*);
3927VALUE rb_funcallv_kw(VALUE, ID, int, const VALUE*, int);
3928VALUE rb_funcallv_public(VALUE, ID, int, const VALUE*);
3929VALUE rb_funcallv_public_kw(VALUE, ID, int, const VALUE*, int);
3930VALUE rb_funcall_passing_block(VALUE, ID, int, const VALUE*);
3931VALUE rb_funcall_passing_block_kw(VALUE, ID, int, const VALUE*, int);
3932VALUE rb_funcall_with_block(VALUE, ID, int, const VALUE*, VALUE);
3933VALUE rb_funcall_with_block_kw(VALUE, ID, int, const VALUE*, VALUE, int);
3934int rb_scan_args(int, const VALUE*, const char*, ...);
3935int rb_scan_args_kw(int, int, const VALUE*, const char*, ...);
3936VALUE rb_call_super(int, const VALUE*);
3937VALUE rb_call_super_kw(int, const VALUE*, int);
3938VALUE rb_current_receiver(void);
3939int rb_get_kwargs(VALUE keyword_hash, const ID *table, int required, int optional, VALUE *);
3940VALUE rb_extract_keywords(VALUE *orighash);
3941VALUE rb_gv_set(const char*, VALUE);
3942VALUE rb_gv_get(const char*);
3943VALUE rb_iv_get(VALUE, const char*);
3944VALUE rb_iv_set(VALUE, const char*, VALUE);
3945VALUE rb_equal(VALUE,VALUE);
3946VALUE *rb_ruby_verbose_ptr(void);
3947VALUE *rb_ruby_debug_ptr(void);
3948enum rb_io_wait_readwrite {RB_IO_WAIT_READABLE, RB_IO_WAIT_WRITABLE};
3949__attribute__ ((__noreturn__)) void rb_raise(VALUE, const char*, ...) __attribute__((format(printf, 2, 3)));
3950__attribute__ ((__noreturn__)) void rb_fatal(const char*, ...) __attribute__((format(printf, 1, 2)));
3951__attribute__((cold)) __attribute__ ((__noreturn__)) void rb_bug(const char*, ...) __attribute__((format(printf, 1, 2)));
3952__attribute__ ((__noreturn__)) void rb_bug_errno(const char*, int);
3953__attribute__ ((__noreturn__)) void rb_sys_fail(const char*);
3954__attribute__ ((__noreturn__)) void rb_sys_fail_str(VALUE);
3955__attribute__ ((__noreturn__)) void rb_mod_sys_fail(VALUE, const char*);
3956__attribute__ ((__noreturn__)) void rb_mod_sys_fail_str(VALUE, VALUE);
3957__attribute__ ((__noreturn__)) void rb_readwrite_sys_fail(enum rb_io_wait_readwrite, const char*);
3958__attribute__ ((__noreturn__)) void rb_iter_break(void);
3959__attribute__ ((__noreturn__)) void rb_iter_break_value(VALUE);
3960__attribute__ ((__noreturn__)) void rb_exit(int);
3961__attribute__ ((__noreturn__)) void rb_notimplement(void);
3962VALUE rb_syserr_new(int, const char *);
3963VALUE rb_syserr_new_str(int n, VALUE arg);
3964__attribute__ ((__noreturn__)) void rb_syserr_fail(int, const char*);
3965__attribute__ ((__noreturn__)) void rb_syserr_fail_str(int, VALUE);
3966__attribute__ ((__noreturn__)) void rb_mod_syserr_fail(VALUE, int, const char*);
3967__attribute__ ((__noreturn__)) void rb_mod_syserr_fail_str(VALUE, int, VALUE);
3968__attribute__ ((__noreturn__)) void rb_readwrite_syserr_fail(enum rb_io_wait_readwrite, int, const char*);
3969void rb_warning(const char*, ...) __attribute__((format(printf, 1, 2)));
3970void rb_compile_warning(const char *, int, const char*, ...) __attribute__((format(printf, 3, 4)));
3971void rb_sys_warning(const char*, ...) __attribute__((format(printf, 1, 2)));
3972__attribute__((cold)) void rb_warn(const char*, ...) __attribute__((format(printf, 1, 2)));
3973void rb_compile_warn(const char *, int, const char*, ...) __attribute__((format(printf, 3, 4)));
3974typedef VALUE rb_block_call_func(VALUE yielded_arg, VALUE callback_arg, int argc, const VALUE *argv, VALUE blockarg);
3975typedef rb_block_call_func *rb_block_call_func_t;
3976VALUE rb_each(VALUE);
3977VALUE rb_yield(VALUE);
3978VALUE rb_yield_values(int n, ...);
3979VALUE rb_yield_values2(int n, const VALUE *argv);
3980VALUE rb_yield_values_kw(int n, const VALUE *argv, int kw_splat);
3981VALUE rb_yield_splat(VALUE);
3982VALUE rb_yield_splat_kw(VALUE, int);
3983VALUE rb_yield_block(VALUE yielded_arg, VALUE callback_arg, int argc, const VALUE *argv, VALUE blockarg);
3984int rb_keyword_given_p(void);
3985int rb_block_given_p(void);
3986void rb_need_block(void);
3987VALUE rb_iterate(VALUE(*)(VALUE),VALUE,rb_block_call_func_t,VALUE);
3988VALUE rb_block_call(VALUE,ID,int,const VALUE*,rb_block_call_func_t,VALUE);
3989VALUE rb_block_call_kw(VALUE,ID,int,const VALUE*,rb_block_call_func_t,VALUE,int);
3990VALUE rb_rescue(VALUE(*)(VALUE),VALUE,VALUE(*)(VALUE,VALUE),VALUE);
3991VALUE rb_rescue2(VALUE(*)(VALUE),VALUE,VALUE(*)(VALUE,VALUE),VALUE,...);
3992VALUE rb_vrescue2(VALUE(*)(VALUE),VALUE,VALUE(*)(VALUE,VALUE),VALUE,va_list);
3993VALUE rb_ensure(VALUE(*)(VALUE),VALUE,VALUE(*)(VALUE),VALUE);
3994VALUE rb_catch(const char*,rb_block_call_func_t,VALUE);
3995VALUE rb_catch_obj(VALUE,rb_block_call_func_t,VALUE);
3996__attribute__ ((__noreturn__)) void rb_throw(const char*,VALUE);
3997__attribute__ ((__noreturn__)) void rb_throw_obj(VALUE,VALUE);
3998VALUE rb_require(const char*);
3999extern VALUE rb_mKernel;
4000extern VALUE rb_mComparable;
4001extern VALUE rb_mEnumerable;
4002extern VALUE rb_mErrno;
4003extern VALUE rb_mFileTest;
4004extern VALUE rb_mGC;
4005extern VALUE rb_mMath;
4006extern VALUE rb_mProcess;
4007extern VALUE rb_mWaitReadable;
4008extern VALUE rb_mWaitWritable;
4009extern VALUE rb_cBasicObject;
4010extern VALUE rb_cObject;
4011extern VALUE rb_cArray;
4012extern VALUE rb_cBinding;
4013extern VALUE rb_cClass;
4014extern VALUE rb_cCont;
4015extern VALUE rb_cData;
4016extern VALUE rb_cDir;
4017extern VALUE rb_cEncoding;
4018extern VALUE rb_cEnumerator;
4019extern VALUE rb_cFalseClass;
4020extern VALUE rb_cFile;
4021extern VALUE rb_cComplex;
4022extern VALUE rb_cFloat;
4023extern VALUE rb_cHash;
4024extern VALUE rb_cIO;
4025extern VALUE rb_cInteger;
4026extern VALUE rb_cMatch;
4027extern VALUE rb_cMethod;
4028extern VALUE rb_cModule;
4029extern VALUE rb_cNameErrorMesg;
4030extern VALUE rb_cNilClass;
4031extern VALUE rb_cNumeric;
4032extern VALUE rb_cProc;
4033extern VALUE rb_cRandom;
4034extern VALUE rb_cRange;
4035extern VALUE rb_cRational;
4036extern VALUE rb_cRegexp;
4037extern VALUE rb_cStat;
4038extern VALUE rb_cString;
4039extern VALUE rb_cStruct;
4040extern VALUE rb_cSymbol;
4041extern VALUE rb_cThread;
4042extern VALUE rb_cTime;
4043extern VALUE rb_cTrueClass;
4044extern VALUE rb_cUnboundMethod;
4045extern VALUE rb_eException;
4046extern VALUE rb_eStandardError;
4047extern VALUE rb_eSystemExit;
4048extern VALUE rb_eInterrupt;
4049extern VALUE rb_eSignal;
4050extern VALUE rb_eFatal;
4051extern VALUE rb_eArgError;
4052extern VALUE rb_eEOFError;
4053extern VALUE rb_eIndexError;
4054extern VALUE rb_eStopIteration;
4055extern VALUE rb_eKeyError;
4056extern VALUE rb_eRangeError;
4057extern VALUE rb_eIOError;
4058extern VALUE rb_eRuntimeError;
4059extern VALUE rb_eFrozenError;
4060extern VALUE rb_eSecurityError;
4061extern VALUE rb_eSystemCallError;
4062extern VALUE rb_eThreadError;
4063extern VALUE rb_eTypeError;
4064extern VALUE rb_eZeroDivError;
4065extern VALUE rb_eNotImpError;
4066extern VALUE rb_eNoMemError;
4067extern VALUE rb_eNoMethodError;
4068extern VALUE rb_eFloatDomainError;
4069extern VALUE rb_eLocalJumpError;
4070extern VALUE rb_eSysStackError;
4071extern VALUE rb_eRegexpError;
4072extern VALUE rb_eEncodingError;
4073extern VALUE rb_eEncCompatError;
4074extern VALUE rb_eNoMatchingPatternError;
4075extern VALUE rb_eScriptError;
4076extern VALUE rb_eNameError;
4077extern VALUE rb_eSyntaxError;
4078extern VALUE rb_eLoadError;
4079extern VALUE rb_eMathDomainError;
4081static inline VALUE
4082rb_class_of(VALUE obj)
4083{
4084 if (((VALUE)(obj) & RUBY_IMMEDIATE_MASK)) {
4085 if ((((int)(long)(obj))&RUBY_FIXNUM_FLAG)) return rb_cInteger;
4086 if (((((int)(long)(obj))&RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG)) return rb_cFloat;
4087 if (obj == ((VALUE)RUBY_Qtrue)) return rb_cTrueClass;
4088 if ((((VALUE)(obj)&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG)) return rb_cSymbol;
4089 }
4090 else if (!!(((VALUE)(obj) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) {
4091 if (obj == ((VALUE)RUBY_Qnil)) return rb_cNilClass;
4092 if (obj == ((VALUE)RUBY_Qfalse)) return rb_cFalseClass;
4093 }
4094 return ((struct RBasic*)(obj))->klass;
4095}
4096static inline int
4097rb_type(VALUE obj)
4098{
4099 if (((VALUE)(obj) & RUBY_IMMEDIATE_MASK)) {
4100 if ((((int)(long)(obj))&RUBY_FIXNUM_FLAG)) return RUBY_T_FIXNUM;
4101 if (((((int)(long)(obj))&RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG)) return RUBY_T_FLOAT;
4102 if (obj == ((VALUE)RUBY_Qtrue)) return RUBY_T_TRUE;
4103 if ((((VALUE)(obj)&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG)) return RUBY_T_SYMBOL;
4104 if (obj == ((VALUE)RUBY_Qundef)) return RUBY_T_UNDEF;
4105 }
4106 else if (!!(((VALUE)(obj) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) {
4107 if (obj == ((VALUE)RUBY_Qnil)) return RUBY_T_NIL;
4108 if (obj == ((VALUE)RUBY_Qfalse)) return RUBY_T_FALSE;
4109 }
4110 return (int)(((struct RBasic*)(obj))->flags & RUBY_T_MASK);
4111}
4112
4113
4114typedef unsigned long st_data_t;
4115typedef struct st_table st_table;
4116typedef st_data_t st_index_t;
4117typedef int st_compare_func(st_data_t, st_data_t);
4118typedef st_index_t st_hash_func(st_data_t);
4119typedef char st_check_for_sizeof_st_index_t[8 == (int)sizeof(st_index_t) ? 1 : -1];
4120struct st_hash_type {
4121 int (*compare)(st_data_t, st_data_t);
4122 st_index_t (*hash)(st_data_t);
4123};
4124typedef struct st_table_entry st_table_entry;
4125struct st_table_entry;
4126struct st_table {
4127 unsigned char entry_power, bin_power, size_ind;
4128 unsigned int rebuilds_num;
4129 const struct st_hash_type *type;
4130 st_index_t num_entries;
4131 st_index_t *bins;
4132 st_index_t entries_start, entries_bound;
4133 st_table_entry *entries;
4134};
4135enum st_retval {ST_CONTINUE, ST_STOP, ST_DELETE, ST_CHECK, ST_REPLACE};
4136st_table *rb_st_init_table(const struct st_hash_type *);
4137st_table *rb_st_init_table_with_size(const struct st_hash_type *, st_index_t);
4138st_table *rb_st_init_numtable(void);
4139st_table *rb_st_init_numtable_with_size(st_index_t);
4140st_table *rb_st_init_strtable(void);
4141st_table *rb_st_init_strtable_with_size(st_index_t);
4142st_table *rb_st_init_strcasetable(void);
4143st_table *rb_st_init_strcasetable_with_size(st_index_t);
4144int rb_st_delete(st_table *, st_data_t *, st_data_t *);
4145int rb_st_delete_safe(st_table *, st_data_t *, st_data_t *, st_data_t);
4146int rb_st_shift(st_table *, st_data_t *, st_data_t *);
4147int rb_st_insert(st_table *, st_data_t, st_data_t);
4148int rb_st_insert2(st_table *, st_data_t, st_data_t, st_data_t (*)(st_data_t));
4149int rb_st_lookup(st_table *, st_data_t, st_data_t *);
4150int rb_st_get_key(st_table *, st_data_t, st_data_t *);
4151typedef int st_update_callback_func(st_data_t *key, st_data_t *value, st_data_t arg, int existing);
4152int rb_st_update(st_table *table, st_data_t key, st_update_callback_func *func, st_data_t arg);
4153typedef int st_foreach_callback_func(st_data_t, st_data_t, st_data_t);
4154typedef int st_foreach_check_callback_func(st_data_t, st_data_t, st_data_t, int);
4155int rb_st_foreach_with_replace(st_table *tab, st_foreach_check_callback_func *func, st_update_callback_func *replace, st_data_t arg);
4156int rb_st_foreach(st_table *, st_foreach_callback_func *, st_data_t);
4157int rb_st_foreach_check(st_table *, st_foreach_check_callback_func *, st_data_t, st_data_t);
4158st_index_t rb_st_keys(st_table *table, st_data_t *keys, st_index_t size);
4159st_index_t rb_st_keys_check(st_table *table, st_data_t *keys, st_index_t size, st_data_t never);
4160st_index_t rb_st_values(st_table *table, st_data_t *values, st_index_t size);
4161st_index_t rb_st_values_check(st_table *table, st_data_t *values, st_index_t size, st_data_t never);
4162void rb_st_add_direct(st_table *, st_data_t, st_data_t);
4163void rb_st_free_table(st_table *);
4164void rb_st_cleanup_safe(st_table *, st_data_t);
4165void rb_st_clear(st_table *);
4166st_table *rb_st_copy(st_table *);
4167__attribute__ ((__const__)) int rb_st_numcmp(st_data_t, st_data_t);
4168__attribute__ ((__const__)) st_index_t rb_st_numhash(st_data_t);
4169__attribute__ ((__pure__)) int rb_st_locale_insensitive_strcasecmp(const char *s1, const char *s2);
4170__attribute__ ((__pure__)) int rb_st_locale_insensitive_strncasecmp(const char *s1, const char *s2, size_t n);
4171__attribute__ ((__pure__)) size_t rb_st_memsize(const st_table *);
4172__attribute__ ((__pure__)) st_index_t rb_st_hash(const void *ptr, size_t len, st_index_t h);
4173__attribute__ ((__const__)) st_index_t rb_st_hash_uint32(st_index_t h, uint32_t i);
4174__attribute__ ((__const__)) st_index_t rb_st_hash_uint(st_index_t h, st_index_t i);
4175__attribute__ ((__const__)) st_index_t rb_st_hash_end(st_index_t h);
4176__attribute__ ((__const__)) st_index_t rb_st_hash_start(st_index_t h);
4177void rb_hash_bulk_insert_into_st_table(long, const VALUE *, VALUE);
4178
4179
4180
4181
4182void rb_mem_clear(VALUE*, long);
4183VALUE rb_assoc_new(VALUE, VALUE);
4184VALUE rb_check_array_type(VALUE);
4185VALUE rb_ary_new(void);
4186VALUE rb_ary_new_capa(long capa);
4187VALUE rb_ary_new_from_args(long n, ...);
4188VALUE rb_ary_new_from_values(long n, const VALUE *elts);
4189VALUE rb_ary_tmp_new(long);
4190void rb_ary_free(VALUE);
4191void rb_ary_modify(VALUE);
4192VALUE rb_ary_freeze(VALUE);
4193VALUE rb_ary_shared_with_p(VALUE, VALUE);
4194VALUE rb_ary_aref(int, const VALUE*, VALUE);
4195VALUE rb_ary_subseq(VALUE, long, long);
4196void rb_ary_store(VALUE, long, VALUE);
4197VALUE rb_ary_dup(VALUE);
4198VALUE rb_ary_resurrect(VALUE ary);
4199VALUE rb_ary_to_ary(VALUE);
4200VALUE rb_ary_to_s(VALUE);
4201VALUE rb_ary_cat(VALUE, const VALUE *, long);
4202VALUE rb_ary_push(VALUE, VALUE);
4203VALUE rb_ary_pop(VALUE);
4204VALUE rb_ary_shift(VALUE);
4205VALUE rb_ary_unshift(VALUE, VALUE);
4206VALUE rb_ary_entry(VALUE, long);
4207VALUE rb_ary_each(VALUE);
4208VALUE rb_ary_join(VALUE, VALUE);
4209VALUE rb_ary_reverse(VALUE);
4210VALUE rb_ary_rotate(VALUE, long);
4211VALUE rb_ary_sort(VALUE);
4212VALUE rb_ary_sort_bang(VALUE);
4213VALUE rb_ary_delete(VALUE, VALUE);
4214VALUE rb_ary_delete_at(VALUE, long);
4215VALUE rb_ary_clear(VALUE);
4216VALUE rb_ary_plus(VALUE, VALUE);
4217VALUE rb_ary_concat(VALUE, VALUE);
4218VALUE rb_ary_assoc(VALUE, VALUE);
4219VALUE rb_ary_rassoc(VALUE, VALUE);
4220VALUE rb_ary_includes(VALUE, VALUE);
4221VALUE rb_ary_cmp(VALUE, VALUE);
4222VALUE rb_ary_replace(VALUE copy, VALUE orig);
4223VALUE rb_get_values_at(VALUE, long, int, const VALUE*, VALUE(*)(VALUE,long));
4224VALUE rb_ary_resize(VALUE ary, long len);
4225VALUE rb_big_new(size_t, int);
4226int rb_bigzero_p(VALUE x);
4227VALUE rb_big_clone(VALUE);
4228void rb_big_2comp(VALUE);
4229VALUE rb_big_norm(VALUE);
4230void rb_big_resize(VALUE big, size_t len);
4231VALUE rb_cstr_to_inum(const char*, int, int);
4232VALUE rb_str_to_inum(VALUE, int, int);
4233VALUE rb_cstr2inum(const char*, int);
4234VALUE rb_str2inum(VALUE, int);
4235VALUE rb_big2str(VALUE, int);
4236long rb_big2long(VALUE);
4237unsigned long rb_big2ulong(VALUE);
4238long long rb_big2ll(VALUE);
4239unsigned long long rb_big2ull(VALUE);
4240void rb_big_pack(VALUE val, unsigned long *buf, long num_longs);
4241VALUE rb_big_unpack(unsigned long *buf, long num_longs);
4242int rb_uv_to_utf8(char[6],unsigned long);
4243VALUE rb_dbl2big(double);
4244double rb_big2dbl(VALUE);
4245VALUE rb_big_cmp(VALUE, VALUE);
4246VALUE rb_big_eq(VALUE, VALUE);
4247VALUE rb_big_eql(VALUE, VALUE);
4248VALUE rb_big_plus(VALUE, VALUE);
4249VALUE rb_big_minus(VALUE, VALUE);
4250VALUE rb_big_mul(VALUE, VALUE);
4251VALUE rb_big_div(VALUE, VALUE);
4252VALUE rb_big_idiv(VALUE, VALUE);
4253VALUE rb_big_modulo(VALUE, VALUE);
4254VALUE rb_big_divmod(VALUE, VALUE);
4255VALUE rb_big_pow(VALUE, VALUE);
4256VALUE rb_big_and(VALUE, VALUE);
4257VALUE rb_big_or(VALUE, VALUE);
4258VALUE rb_big_xor(VALUE, VALUE);
4259VALUE rb_big_lshift(VALUE, VALUE);
4260VALUE rb_big_rshift(VALUE, VALUE);
4261int rb_integer_pack(VALUE val, void *words, size_t numwords, size_t wordsize, size_t nails, int flags);
4262VALUE rb_integer_unpack(const void *words, size_t numwords, size_t wordsize, size_t nails, int flags);
4263size_t rb_absint_size(VALUE val, int *nlz_bits_ret);
4264size_t rb_absint_numwords(VALUE val, size_t word_numbits, size_t *nlz_bits_ret);
4265int rb_absint_singlebit_p(VALUE val);
4266VALUE rb_rational_raw(VALUE, VALUE);
4267VALUE rb_rational_new(VALUE, VALUE);
4268VALUE rb_Rational(VALUE, VALUE);
4269VALUE rb_rational_num(VALUE rat);
4270VALUE rb_rational_den(VALUE rat);
4271VALUE rb_flt_rationalize_with_prec(VALUE, VALUE);
4272VALUE rb_flt_rationalize(VALUE);
4273VALUE rb_complex_raw(VALUE, VALUE);
4274VALUE rb_complex_new(VALUE, VALUE);
4275VALUE rb_complex_new_polar(VALUE abs, VALUE arg);
4276__attribute__ ((__deprecated__("by ""rb_complex_new_polar"))) VALUE rb_complex_polar(VALUE abs, VALUE arg);
4277VALUE rb_complex_real(VALUE z);
4278VALUE rb_complex_imag(VALUE z);
4279VALUE rb_complex_plus(VALUE x, VALUE y);
4280VALUE rb_complex_minus(VALUE x, VALUE y);
4281VALUE rb_complex_mul(VALUE x, VALUE y);
4282VALUE rb_complex_div(VALUE x, VALUE y);
4283VALUE rb_complex_uminus(VALUE z);
4284VALUE rb_complex_conjugate(VALUE z);
4285VALUE rb_complex_abs(VALUE z);
4286VALUE rb_complex_arg(VALUE z);
4287VALUE rb_complex_pow(VALUE base, VALUE exp);
4288VALUE rb_dbl_complex_new(double real, double imag);
4289VALUE rb_Complex(VALUE, VALUE);
4290VALUE rb_class_new(VALUE);
4291VALUE rb_mod_init_copy(VALUE, VALUE);
4292VALUE rb_singleton_class_clone(VALUE);
4293void rb_singleton_class_attached(VALUE,VALUE);
4294void rb_check_inheritable(VALUE);
4295VALUE rb_define_class_id(ID, VALUE);
4296VALUE rb_define_class_id_under(VALUE, ID, VALUE);
4297VALUE rb_module_new(void);
4298VALUE rb_define_module_id(ID);
4299VALUE rb_define_module_id_under(VALUE, ID);
4300VALUE rb_mod_included_modules(VALUE);
4301VALUE rb_mod_include_p(VALUE, VALUE);
4302VALUE rb_mod_ancestors(VALUE);
4303VALUE rb_class_instance_methods(int, const VALUE*, VALUE);
4304VALUE rb_class_public_instance_methods(int, const VALUE*, VALUE);
4305VALUE rb_class_protected_instance_methods(int, const VALUE*, VALUE);
4306VALUE rb_class_private_instance_methods(int, const VALUE*, VALUE);
4307VALUE rb_obj_singleton_methods(int, const VALUE*, VALUE);
4308void rb_define_method_id(VALUE, ID, VALUE (*)(), int);
4309void rb_undef(VALUE, ID);
4310void rb_define_protected_method(VALUE, const char*, VALUE (*)(), int);
4311void rb_define_private_method(VALUE, const char*, VALUE (*)(), int);
4312void rb_define_singleton_method(VALUE, const char*, VALUE(*)(), int);
4313VALUE rb_singleton_class(VALUE);
4314int rb_cmpint(VALUE, VALUE, VALUE);
4315__attribute__ ((__noreturn__)) void rb_cmperr(VALUE, VALUE);
4316VALUE rb_fiber_new(rb_block_call_func_t, VALUE);
4317VALUE rb_fiber_resume(VALUE fib, int argc, const VALUE *argv);
4318VALUE rb_fiber_resume_kw(VALUE fib, int argc, const VALUE *argv, int kw_splat);
4319VALUE rb_fiber_yield(int argc, const VALUE *argv);
4320VALUE rb_fiber_yield_kw(int argc, const VALUE *argv, int kw_splat);
4321VALUE rb_fiber_current(void);
4322VALUE rb_fiber_alive_p(VALUE);
4323VALUE rb_enum_values_pack(int, const VALUE*);
4324VALUE rb_enumeratorize(VALUE, VALUE, int, const VALUE *);
4325typedef VALUE rb_enumerator_size_func(VALUE, VALUE, VALUE);
4326VALUE rb_enumeratorize_with_size(VALUE, VALUE, int, const VALUE *, rb_enumerator_size_func *);
4327VALUE rb_enumeratorize_with_size_kw(VALUE, VALUE, int, const VALUE *, rb_enumerator_size_func *, int);
4328typedef struct {
4329 VALUE begin;
4330 VALUE end;
4331 VALUE step;
4332 int exclude_end;
4335VALUE rb_exc_new(VALUE, const char*, long);
4336VALUE rb_exc_new_cstr(VALUE, const char*);
4337VALUE rb_exc_new_str(VALUE, VALUE);
4338__attribute__ ((__noreturn__)) void rb_loaderror(const char*, ...) __attribute__((format(printf, 1, 2)));
4339__attribute__ ((__noreturn__)) void rb_loaderror_with_path(VALUE path, const char*, ...) __attribute__((format(printf, 2, 3)));
4340__attribute__ ((__noreturn__)) void rb_name_error(ID, const char*, ...) __attribute__((format(printf, 2, 3)));
4341__attribute__ ((__noreturn__)) void rb_name_error_str(VALUE, const char*, ...) __attribute__((format(printf, 2, 3)));
4342__attribute__ ((__noreturn__)) void rb_frozen_error_raise(VALUE, const char*, ...) __attribute__((format(printf, 2, 3)));
4343__attribute__ ((__noreturn__)) void rb_invalid_str(const char*, const char*);
4344__attribute__ ((__noreturn__)) void rb_error_frozen(const char*);
4345__attribute__ ((__noreturn__)) void rb_error_frozen_object(VALUE);
4346void rb_error_untrusted(VALUE);
4347void rb_check_frozen(VALUE);
4348void rb_check_trusted(VALUE);
4349void rb_check_copyable(VALUE obj, VALUE orig);
4350int rb_sourceline(void);
4351const char *rb_sourcefile(void);
4352VALUE rb_check_funcall(VALUE, ID, int, const VALUE*);
4353VALUE rb_check_funcall_kw(VALUE, ID, int, const VALUE*, int);
4354__attribute__ ((__noreturn__)) static void rb_error_arity(int, int, int);
4355static inline int
4356rb_check_arity(int argc, int min, int max)
4357{
4358 if ((argc < min) || (max != (-1) && argc > max))
4359 rb_error_arity(argc, min, max);
4360 return argc;
4361}
4362typedef struct {
4363 int maxfd;
4364 fd_set *fdset;
4365} rb_fdset_t;
4366void rb_fd_init(rb_fdset_t *);
4367void rb_fd_term(rb_fdset_t *);
4368void rb_fd_zero(rb_fdset_t *);
4369void rb_fd_set(int, rb_fdset_t *);
4370void rb_fd_clr(int, rb_fdset_t *);
4371int rb_fd_isset(int, const rb_fdset_t *);
4372void rb_fd_copy(rb_fdset_t *, const fd_set *, int);
4373void rb_fd_dup(rb_fdset_t *dst, const rb_fdset_t *src);
4374struct timeval;
4375int rb_fd_select(int, rb_fdset_t *, rb_fdset_t *, rb_fdset_t *, struct timeval *);
4376__attribute__ ((__noreturn__)) void rb_exc_raise(VALUE);
4377__attribute__ ((__noreturn__)) void rb_exc_fatal(VALUE);
4378__attribute__ ((__noreturn__)) VALUE rb_f_exit(int, const VALUE*);
4379__attribute__ ((__noreturn__)) VALUE rb_f_abort(int, const VALUE*);
4380void rb_remove_method(VALUE, const char*);
4381void rb_remove_method_id(VALUE, ID);
4382typedef VALUE (*rb_alloc_func_t)(VALUE);
4384void rb_undef_alloc_func(VALUE);
4386void rb_clear_constant_cache(void);
4387void rb_clear_method_cache_by_class(VALUE);
4388void rb_alias(VALUE, ID, ID);
4389void rb_attr(VALUE,ID,int,int,int);
4390int rb_method_boundp(VALUE, ID, int);
4391int rb_method_basic_definition_p(VALUE, ID);
4392VALUE rb_eval_cmd(VALUE, VALUE, int);
4393VALUE rb_eval_cmd_kw(VALUE, VALUE, int);
4394int rb_obj_respond_to(VALUE, ID, int);
4395int rb_respond_to(VALUE, ID);
4396__attribute__ ((__noreturn__)) VALUE rb_f_notimplement(int argc, const VALUE *argv, VALUE obj, VALUE marker);
4397__attribute__ ((__noreturn__)) void rb_interrupt(void);
4398VALUE rb_apply(VALUE, ID, VALUE);
4399void rb_backtrace(void);
4400ID rb_frame_this_func(void);
4401VALUE rb_obj_instance_eval(int, const VALUE*, VALUE);
4402VALUE rb_obj_instance_exec(int, const VALUE*, VALUE);
4403VALUE rb_mod_module_eval(int, const VALUE*, VALUE);
4404VALUE rb_mod_module_exec(int, const VALUE*, VALUE);
4405void rb_load(VALUE, int);
4406void rb_load_protect(VALUE, int, int*);
4407__attribute__ ((__noreturn__)) void rb_jump_tag(int);
4408int rb_provided(const char*);
4409int rb_feature_provided(const char *, const char **);
4410void rb_provide(const char*);
4411VALUE rb_f_require(VALUE, VALUE);
4412VALUE rb_require_safe(VALUE, int);
4413VALUE rb_require_string(VALUE);
4414void rb_obj_call_init(VALUE, int, const VALUE*);
4415void rb_obj_call_init_kw(VALUE, int, const VALUE*, int);
4416VALUE rb_class_new_instance(int, const VALUE*, VALUE);
4417VALUE rb_class_new_instance_kw(int, const VALUE*, VALUE, int);
4418VALUE rb_block_proc(void);
4419VALUE rb_block_lambda(void);
4420VALUE rb_proc_new(rb_block_call_func_t, VALUE);
4421VALUE rb_obj_is_proc(VALUE);
4422VALUE rb_proc_call(VALUE, VALUE);
4423VALUE rb_proc_call_kw(VALUE, VALUE, int);
4424VALUE rb_proc_call_with_block(VALUE, int argc, const VALUE *argv, VALUE);
4425VALUE rb_proc_call_with_block_kw(VALUE, int argc, const VALUE *argv, VALUE, int);
4426int rb_proc_arity(VALUE);
4427VALUE rb_proc_lambda_p(VALUE);
4428VALUE rb_binding_new(void);
4429VALUE rb_obj_method(VALUE, VALUE);
4430VALUE rb_obj_is_method(VALUE);
4431VALUE rb_method_call(int, const VALUE*, VALUE);
4432VALUE rb_method_call_kw(int, const VALUE*, VALUE, int);
4433VALUE rb_method_call_with_block(int, const VALUE *, VALUE, VALUE);
4434VALUE rb_method_call_with_block_kw(int, const VALUE *, VALUE, VALUE, int);
4435int rb_mod_method_arity(VALUE, ID);
4436int rb_obj_method_arity(VALUE, ID);
4437VALUE rb_protect(VALUE (*)(VALUE), VALUE, int*);
4438void rb_set_end_proc(void (*)(VALUE), VALUE);
4439void rb_thread_schedule(void);
4440void rb_thread_wait_fd(int);
4441int rb_thread_fd_writable(int);
4442void rb_thread_fd_close(int);
4443int rb_thread_alone(void);
4444void rb_thread_sleep(int);
4445void rb_thread_sleep_forever(void);
4446void rb_thread_sleep_deadly(void);
4447VALUE rb_thread_stop(void);
4448VALUE rb_thread_wakeup(VALUE);
4449VALUE rb_thread_wakeup_alive(VALUE);
4450VALUE rb_thread_run(VALUE);
4451VALUE rb_thread_kill(VALUE);
4452VALUE rb_thread_create(VALUE (*)(void *), void*);
4453int rb_thread_fd_select(int, rb_fdset_t *, rb_fdset_t *, rb_fdset_t *, struct timeval *);
4454void rb_thread_wait_for(struct timeval);
4455VALUE rb_thread_current(void);
4456VALUE rb_thread_main(void);
4457VALUE rb_thread_local_aref(VALUE, ID);
4458VALUE rb_thread_local_aset(VALUE, ID, VALUE);
4459void rb_thread_atfork(void);
4461VALUE rb_exec_recursive(VALUE(*)(VALUE, VALUE, int),VALUE,VALUE);
4462VALUE rb_exec_recursive_paired(VALUE(*)(VALUE, VALUE, int),VALUE,VALUE,VALUE);
4463VALUE rb_exec_recursive_outer(VALUE(*)(VALUE, VALUE, int),VALUE,VALUE);
4464VALUE rb_exec_recursive_paired_outer(VALUE(*)(VALUE, VALUE, int),VALUE,VALUE,VALUE);
4465VALUE rb_dir_getwd(void);
4466VALUE rb_file_s_expand_path(int, const VALUE *);
4467VALUE rb_file_expand_path(VALUE, VALUE);
4468VALUE rb_file_s_absolute_path(int, const VALUE *);
4469VALUE rb_file_absolute_path(VALUE, VALUE);
4470VALUE rb_file_dirname(VALUE fname);
4471int rb_find_file_ext_safe(VALUE*, const char* const*, int);
4472VALUE rb_find_file_safe(VALUE, int);
4473int rb_find_file_ext(VALUE*, const char* const*);
4474VALUE rb_find_file(VALUE);
4475VALUE rb_file_directory_p(VALUE,VALUE);
4476VALUE rb_str_encode_ospath(VALUE);
4477int rb_is_absolute_path(const char *);
4478__attribute__((cold)) __attribute__ ((__noreturn__)) void rb_memerror(void);
4479__attribute__ ((__pure__)) int rb_during_gc(void);
4480void rb_gc_mark_locations(const VALUE*, const VALUE*);
4481void rb_mark_tbl(struct st_table*);
4482void rb_mark_tbl_no_pin(struct st_table*);
4483void rb_mark_set(struct st_table*);
4484void rb_mark_hash(struct st_table*);
4486void rb_gc_mark_maybe(VALUE);
4487void rb_gc_mark(VALUE);
4488void rb_gc_mark_movable(VALUE);
4489VALUE rb_gc_location(VALUE);
4490void rb_gc_force_recycle(VALUE);
4491void rb_gc(void);
4492void rb_gc_copy_finalizer(VALUE,VALUE);
4493VALUE rb_gc_enable(void);
4494VALUE rb_gc_disable(void);
4495VALUE rb_gc_start(void);
4496VALUE rb_define_finalizer(VALUE, VALUE);
4497VALUE rb_undefine_finalizer(VALUE);
4498size_t rb_gc_count(void);
4499size_t rb_gc_stat(VALUE);
4500VALUE rb_gc_latest_gc_info(VALUE);
4501void rb_gc_adjust_memory_usage(ssize_t);
4502void rb_st_foreach_safe(struct st_table *, int (*)(st_data_t, st_data_t, st_data_t), st_data_t);
4503VALUE rb_check_hash_type(VALUE);
4504void rb_hash_foreach(VALUE, int (*)(VALUE, VALUE, VALUE), VALUE);
4505VALUE rb_hash(VALUE);
4506VALUE rb_hash_new(void);
4507VALUE rb_hash_dup(VALUE);
4508VALUE rb_hash_freeze(VALUE);
4509VALUE rb_hash_aref(VALUE, VALUE);
4510VALUE rb_hash_lookup(VALUE, VALUE);
4511VALUE rb_hash_lookup2(VALUE, VALUE, VALUE);
4512VALUE rb_hash_fetch(VALUE, VALUE);
4513VALUE rb_hash_aset(VALUE, VALUE, VALUE);
4514VALUE rb_hash_clear(VALUE);
4515VALUE rb_hash_delete_if(VALUE);
4516VALUE rb_hash_delete(VALUE,VALUE);
4517VALUE rb_hash_set_ifnone(VALUE hash, VALUE ifnone);
4518void rb_hash_bulk_insert(long, const VALUE *, VALUE);
4519typedef VALUE rb_hash_update_func(VALUE newkey, VALUE oldkey, VALUE value);
4520VALUE rb_hash_update_by(VALUE hash1, VALUE hash2, rb_hash_update_func *func);
4521struct st_table *rb_hash_tbl(VALUE, const char *file, int line);
4522int rb_path_check(const char*);
4523int rb_env_path_tainted(void);
4524VALUE rb_env_clear(void);
4525VALUE rb_hash_size(VALUE);
4526void rb_hash_free(VALUE);
4527extern VALUE rb_fs;
4528extern VALUE rb_output_fs;
4529extern VALUE rb_rs;
4530extern VALUE rb_default_rs;
4531extern VALUE rb_output_rs;
4532VALUE rb_io_write(VALUE, VALUE);
4533VALUE rb_io_gets(VALUE);
4534VALUE rb_io_getbyte(VALUE);
4535VALUE rb_io_ungetc(VALUE, VALUE);
4536VALUE rb_io_ungetbyte(VALUE, VALUE);
4537VALUE rb_io_close(VALUE);
4538VALUE rb_io_flush(VALUE);
4539VALUE rb_io_eof(VALUE);
4540VALUE rb_io_binmode(VALUE);
4541VALUE rb_io_ascii8bit_binmode(VALUE);
4542VALUE rb_io_addstr(VALUE, VALUE);
4543VALUE rb_io_printf(int, const VALUE*, VALUE);
4544VALUE rb_io_print(int, const VALUE*, VALUE);
4545VALUE rb_io_puts(int, const VALUE*, VALUE);
4546VALUE rb_io_fdopen(int, int, const char*);
4547VALUE rb_io_get_io(VALUE);
4548VALUE rb_file_open(const char*, const char*);
4549VALUE rb_file_open_str(VALUE, const char*);
4550VALUE rb_gets(void);
4551void rb_write_error(const char*);
4552void rb_write_error2(const char*, long);
4553void rb_close_before_exec(int lowfd, int maxhint, VALUE noclose_fds);
4554int rb_pipe(int *pipes);
4555int rb_reserved_fd_p(int fd);
4556int rb_cloexec_open(const char *pathname, int flags, mode_t mode);
4557int rb_cloexec_dup(int oldfd);
4558int rb_cloexec_dup2(int oldfd, int newfd);
4559int rb_cloexec_pipe(int fildes[2]);
4560int rb_cloexec_fcntl_dupfd(int fd, int minfd);
4561void rb_update_max_fd(int fd);
4562void rb_fd_fix_cloexec(int fd);
4563VALUE rb_marshal_dump(VALUE, VALUE);
4564VALUE rb_marshal_load(VALUE);
4565void rb_marshal_define_compat(VALUE newclass, VALUE oldclass, VALUE (*dumper)(VALUE), VALUE (*loader)(VALUE, VALUE));
4566__attribute__ ((__noreturn__)) void rb_num_zerodiv(void);
4567VALUE rb_num_coerce_bin(VALUE, VALUE, ID);
4568VALUE rb_num_coerce_cmp(VALUE, VALUE, ID);
4569VALUE rb_num_coerce_relop(VALUE, VALUE, ID);
4570VALUE rb_num_coerce_bit(VALUE, VALUE, ID);
4571VALUE rb_num2fix(VALUE);
4572VALUE rb_fix2str(VALUE, int);
4573__attribute__ ((__const__)) VALUE rb_dbl_cmp(double, double);
4574int rb_eql(VALUE, VALUE);
4575VALUE rb_any_to_s(VALUE);
4576VALUE rb_inspect(VALUE);
4577VALUE rb_obj_is_instance_of(VALUE, VALUE);
4578VALUE rb_obj_is_kind_of(VALUE, VALUE);
4579VALUE rb_obj_alloc(VALUE);
4580VALUE rb_obj_clone(VALUE);
4581VALUE rb_obj_dup(VALUE);
4582VALUE rb_obj_init_copy(VALUE,VALUE);
4583VALUE rb_obj_taint(VALUE);
4584__attribute__ ((__pure__)) VALUE rb_obj_tainted(VALUE);
4585VALUE rb_obj_untaint(VALUE);
4586VALUE rb_obj_untrust(VALUE);
4587__attribute__ ((__pure__)) VALUE rb_obj_untrusted(VALUE);
4588VALUE rb_obj_trust(VALUE);
4589VALUE rb_obj_freeze(VALUE);
4590__attribute__ ((__pure__)) VALUE rb_obj_frozen_p(VALUE);
4591VALUE rb_obj_id(VALUE);
4592VALUE rb_memory_id(VALUE);
4593VALUE rb_obj_class(VALUE);
4594__attribute__ ((__pure__)) VALUE rb_class_real(VALUE);
4595__attribute__ ((__pure__)) VALUE rb_class_inherited_p(VALUE, VALUE);
4596VALUE rb_class_superclass(VALUE);
4597VALUE rb_class_get_superclass(VALUE);
4598VALUE rb_convert_type(VALUE,int,const char*,const char*);
4599VALUE rb_check_convert_type(VALUE,int,const char*,const char*);
4600VALUE rb_check_to_integer(VALUE, const char *);
4601VALUE rb_check_to_float(VALUE);
4602VALUE rb_to_int(VALUE);
4603VALUE rb_check_to_int(VALUE);
4604VALUE rb_Integer(VALUE);
4605VALUE rb_to_float(VALUE);
4606VALUE rb_Float(VALUE);
4607VALUE rb_String(VALUE);
4608VALUE rb_Array(VALUE);
4609VALUE rb_Hash(VALUE);
4610double rb_cstr_to_dbl(const char*, int);
4611double rb_str_to_dbl(VALUE, int);
4612ID rb_id_attrset(ID);
4613__attribute__ ((__const__)) int rb_is_const_id(ID);
4614__attribute__ ((__const__)) int rb_is_global_id(ID);
4615__attribute__ ((__const__)) int rb_is_instance_id(ID);
4616__attribute__ ((__const__)) int rb_is_attrset_id(ID);
4617__attribute__ ((__const__)) int rb_is_class_id(ID);
4618__attribute__ ((__const__)) int rb_is_local_id(ID);
4619__attribute__ ((__const__)) int rb_is_junk_id(ID);
4620int rb_symname_p(const char*);
4621int rb_sym_interned_p(VALUE);
4622VALUE rb_backref_get(void);
4623void rb_backref_set(VALUE);
4624VALUE rb_lastline_get(void);
4625void rb_lastline_set(VALUE);
4626void rb_last_status_set(int status, pid_t pid);
4627VALUE rb_last_status_get(void);
4628int rb_proc_exec(const char*);
4629__attribute__ ((__noreturn__)) VALUE rb_f_exec(int, const VALUE*);
4630pid_t rb_waitpid(pid_t pid, int *status, int flags);
4631void rb_syswait(pid_t pid);
4632pid_t rb_spawn(int, const VALUE*);
4633pid_t rb_spawn_err(int, const VALUE*, char*, size_t);
4634VALUE rb_proc_times(VALUE);
4635VALUE rb_detach_process(pid_t pid);
4636VALUE rb_range_new(VALUE, VALUE, int);
4637VALUE rb_range_beg_len(VALUE, long*, long*, long, int);
4638int rb_range_values(VALUE range, VALUE *begp, VALUE *endp, int *exclp);
4639unsigned int rb_genrand_int32(void);
4640double rb_genrand_real(void);
4641void rb_reset_random_seed(void);
4642VALUE rb_random_bytes(VALUE rnd, long n);
4643VALUE rb_random_int(VALUE rnd, VALUE max);
4644unsigned int rb_random_int32(VALUE rnd);
4645double rb_random_real(VALUE rnd);
4646unsigned long rb_random_ulong_limited(VALUE rnd, unsigned long limit);
4647unsigned long rb_genrand_ulong_limited(unsigned long i);
4648int rb_memcicmp(const void*,const void*,long);
4649void rb_match_busy(VALUE);
4650VALUE rb_reg_nth_defined(int, VALUE);
4651VALUE rb_reg_nth_match(int, VALUE);
4652int rb_reg_backref_number(VALUE match, VALUE backref);
4653VALUE rb_reg_last_match(VALUE);
4654VALUE rb_reg_match_pre(VALUE);
4655VALUE rb_reg_match_post(VALUE);
4656VALUE rb_reg_match_last(VALUE);
4657VALUE rb_reg_new_str(VALUE, int);
4658VALUE rb_reg_new(const char *, long, int);
4659VALUE rb_reg_alloc(void);
4660VALUE rb_reg_init_str(VALUE re, VALUE s, int options);
4661VALUE rb_reg_match(VALUE, VALUE);
4662VALUE rb_reg_match2(VALUE);
4663int rb_reg_options(VALUE);
4664extern VALUE rb_argv0;
4665VALUE rb_get_argv(void);
4666void *rb_load_file(const char*);
4667void *rb_load_file_str(VALUE);
4668VALUE rb_f_kill(int, const VALUE*);
4669void (*ruby_posix_signal(int, void (*)(int)))(int);
4670const char *ruby_signal_name(int);
4671void ruby_default_signal(int);
4672VALUE rb_f_sprintf(int, const VALUE*);
4673VALUE rb_sprintf(const char*, ...) __attribute__((format(printf, 1, 2)));
4674VALUE rb_vsprintf(const char*, va_list);
4675VALUE rb_str_catf(VALUE, const char*, ...) __attribute__((format(printf, 2, 3)));
4676VALUE rb_str_vcatf(VALUE, const char*, va_list);
4677VALUE rb_str_format(int, const VALUE *, VALUE);
4678VALUE rb_str_new(const char*, long);
4679VALUE rb_str_new_cstr(const char*);
4680VALUE rb_str_new_shared(VALUE);
4681VALUE rb_str_new_frozen(VALUE);
4682VALUE rb_str_new_with_class(VALUE, const char*, long);
4683VALUE rb_tainted_str_new_cstr(const char*);
4684VALUE rb_tainted_str_new(const char*, long);
4685VALUE rb_external_str_new(const char*, long);
4686VALUE rb_external_str_new_cstr(const char*);
4687VALUE rb_locale_str_new(const char*, long);
4688VALUE rb_locale_str_new_cstr(const char*);
4689VALUE rb_filesystem_str_new(const char*, long);
4690VALUE rb_filesystem_str_new_cstr(const char*);
4691VALUE rb_str_buf_new(long);
4692VALUE rb_str_buf_new_cstr(const char*);
4693VALUE rb_str_buf_new2(const char*);
4694VALUE rb_str_tmp_new(long);
4695VALUE rb_usascii_str_new(const char*, long);
4696VALUE rb_usascii_str_new_cstr(const char*);
4697VALUE rb_utf8_str_new(const char*, long);
4698VALUE rb_utf8_str_new_cstr(const char*);
4699VALUE rb_str_new_static(const char *, long);
4700VALUE rb_usascii_str_new_static(const char *, long);
4701VALUE rb_utf8_str_new_static(const char *, long);
4702void rb_str_free(VALUE);
4703void rb_str_shared_replace(VALUE, VALUE);
4704VALUE rb_str_buf_append(VALUE, VALUE);
4705VALUE rb_str_buf_cat(VALUE, const char*, long);
4706VALUE rb_str_buf_cat2(VALUE, const char*);
4707VALUE rb_str_buf_cat_ascii(VALUE, const char*);
4708VALUE rb_obj_as_string(VALUE);
4709VALUE rb_check_string_type(VALUE);
4710void rb_must_asciicompat(VALUE);
4711VALUE rb_str_dup(VALUE);
4712VALUE rb_str_resurrect(VALUE str);
4713VALUE rb_str_locktmp(VALUE);
4714VALUE rb_str_unlocktmp(VALUE);
4715VALUE rb_str_dup_frozen(VALUE);
4716VALUE rb_str_plus(VALUE, VALUE);
4717VALUE rb_str_times(VALUE, VALUE);
4718long rb_str_sublen(VALUE, long);
4719VALUE rb_str_substr(VALUE, long, long);
4720VALUE rb_str_subseq(VALUE, long, long);
4721char *rb_str_subpos(VALUE, long, long*);
4722void rb_str_modify(VALUE);
4723void rb_str_modify_expand(VALUE, long);
4724VALUE rb_str_freeze(VALUE);
4725void rb_str_set_len(VALUE, long);
4726VALUE rb_str_resize(VALUE, long);
4727VALUE rb_str_cat(VALUE, const char*, long);
4728VALUE rb_str_cat_cstr(VALUE, const char*);
4729VALUE rb_str_cat2(VALUE, const char*);
4730VALUE rb_str_append(VALUE, VALUE);
4731VALUE rb_str_concat(VALUE, VALUE);
4732st_index_t rb_memhash(const void *ptr, long len);
4733st_index_t rb_hash_start(st_index_t);
4734st_index_t rb_hash_uint32(st_index_t, uint32_t);
4735st_index_t rb_hash_uint(st_index_t, st_index_t);
4736st_index_t rb_hash_end(st_index_t);
4737st_index_t rb_str_hash(VALUE);
4738int rb_str_hash_cmp(VALUE,VALUE);
4739int rb_str_comparable(VALUE, VALUE);
4740int rb_str_cmp(VALUE, VALUE);
4741VALUE rb_str_equal(VALUE str1, VALUE str2);
4742VALUE rb_str_drop_bytes(VALUE, long);
4743void rb_str_update(VALUE, long, long, VALUE);
4744VALUE rb_str_replace(VALUE, VALUE);
4745VALUE rb_str_inspect(VALUE);
4746VALUE rb_str_dump(VALUE);
4747VALUE rb_str_split(VALUE, const char*);
4749VALUE rb_str_intern(VALUE);
4750VALUE rb_sym_to_s(VALUE);
4751long rb_str_strlen(VALUE);
4752VALUE rb_str_length(VALUE);
4753long rb_str_offset(VALUE, long);
4754__attribute__ ((__pure__)) size_t rb_str_capacity(VALUE);
4755VALUE rb_str_ellipsize(VALUE, long);
4756VALUE rb_str_scrub(VALUE, VALUE);
4757VALUE rb_sym_all_symbols(void);
4758VALUE rb_struct_new(VALUE, ...);
4759VALUE rb_struct_define(const char*, ...);
4760VALUE rb_struct_define_under(VALUE, const char*, ...);
4761VALUE rb_struct_alloc(VALUE, VALUE);
4762VALUE rb_struct_initialize(VALUE, VALUE);
4763VALUE rb_struct_aref(VALUE, VALUE);
4764VALUE rb_struct_aset(VALUE, VALUE, VALUE);
4765VALUE rb_struct_getmember(VALUE, ID);
4766VALUE rb_struct_s_members(VALUE);
4767VALUE rb_struct_members(VALUE);
4768VALUE rb_struct_size(VALUE s);
4769VALUE rb_struct_alloc_noinit(VALUE);
4770VALUE rb_struct_define_without_accessor(const char *, VALUE, rb_alloc_func_t, ...);
4771VALUE rb_struct_define_without_accessor_under(VALUE outer, const char *class_name, VALUE super, rb_alloc_func_t alloc, ...);
4772typedef void rb_unblock_function_t(void *);
4773typedef VALUE rb_blocking_function_t(void *);
4774void rb_thread_check_ints(void);
4775int rb_thread_interrupted(VALUE thval);
4776VALUE rb_mutex_new(void);
4777VALUE rb_mutex_locked_p(VALUE mutex);
4778VALUE rb_mutex_trylock(VALUE mutex);
4779VALUE rb_mutex_lock(VALUE mutex);
4780VALUE rb_mutex_unlock(VALUE mutex);
4781VALUE rb_mutex_sleep(VALUE self, VALUE timeout);
4782VALUE rb_mutex_synchronize(VALUE mutex, VALUE (*func)(VALUE arg), VALUE arg);
4783struct timespec;
4784void rb_timespec_now(struct timespec *);
4785VALUE rb_time_new(time_t, long);
4786VALUE rb_time_nano_new(time_t, long);
4787VALUE rb_time_timespec_new(const struct timespec *, int);
4788VALUE rb_time_num_new(VALUE, VALUE);
4789struct timeval rb_time_interval(VALUE num);
4790struct timeval rb_time_timeval(VALUE time);
4791struct timespec rb_time_timespec(VALUE time);
4792struct timespec rb_time_timespec_interval(VALUE num);
4793VALUE rb_time_utc_offset(VALUE time);
4794VALUE rb_mod_name(VALUE);
4795VALUE rb_class_path(VALUE);
4796VALUE rb_class_path_cached(VALUE);
4797void rb_set_class_path(VALUE, VALUE, const char*);
4798void rb_set_class_path_string(VALUE, VALUE, VALUE);
4799VALUE rb_path_to_class(VALUE);
4800VALUE rb_path2class(const char*);
4801VALUE rb_class_name(VALUE);
4802VALUE rb_autoload_load(VALUE, ID);
4803VALUE rb_autoload_p(VALUE, ID);
4804VALUE rb_f_trace_var(int, const VALUE*);
4805VALUE rb_f_untrace_var(int, const VALUE*);
4806VALUE rb_f_global_variables(void);
4807void rb_alias_variable(ID, ID);
4808void rb_copy_generic_ivar(VALUE,VALUE);
4809void rb_free_generic_ivar(VALUE);
4810VALUE rb_ivar_get(VALUE, ID);
4811VALUE rb_ivar_set(VALUE, ID, VALUE);
4812VALUE rb_ivar_defined(VALUE, ID);
4813void rb_ivar_foreach(VALUE, int (*)(ID, VALUE, st_data_t), st_data_t);
4814st_index_t rb_ivar_count(VALUE);
4815VALUE rb_attr_get(VALUE, ID);
4816VALUE rb_obj_instance_variables(VALUE);
4817VALUE rb_obj_remove_instance_variable(VALUE, VALUE);
4818void *rb_mod_const_at(VALUE, void*);
4819void *rb_mod_const_of(VALUE, void*);
4820VALUE rb_const_list(void*);
4821VALUE rb_mod_constants(int, const VALUE *, VALUE);
4822VALUE rb_mod_remove_const(VALUE, VALUE);
4823int rb_const_defined(VALUE, ID);
4824int rb_const_defined_at(VALUE, ID);
4825int rb_const_defined_from(VALUE, ID);
4826VALUE rb_const_get(VALUE, ID);
4827VALUE rb_const_get_at(VALUE, ID);
4828VALUE rb_const_get_from(VALUE, ID);
4829void rb_const_set(VALUE, ID, VALUE);
4830VALUE rb_const_remove(VALUE, ID);
4831VALUE rb_cvar_defined(VALUE, ID);
4832void rb_cvar_set(VALUE, ID, VALUE);
4833VALUE rb_cvar_get(VALUE, ID);
4834void rb_cv_set(VALUE, const char*, VALUE);
4835VALUE rb_cv_get(VALUE, const char*);
4836void rb_define_class_variable(VALUE, const char*, VALUE);
4837VALUE rb_mod_class_variables(int, const VALUE*, VALUE);
4838VALUE rb_mod_remove_cvar(VALUE, VALUE);
4839ID rb_frame_callee(void);
4840int rb_frame_method_id_and_class(ID *idp, VALUE *klassp);
4841VALUE rb_str_succ(VALUE);
4842VALUE rb_time_succ(VALUE);
4843VALUE rb_make_backtrace(void);
4844VALUE rb_make_exception(int, const VALUE*);
4845
4846
4847 __attribute__((__unused__,__weakref__("rb_define_method_id"),__nonnull__ (3)))static void rb_define_method_id0(VALUE klass, ID name,VALUE(*func)(VALUE),int arity); __attribute__((__unused__,__weakref__("rb_define_method_id"),__nonnull__ (3)))static void rb_define_method_id1(VALUE klass, ID name,VALUE(*func)(VALUE,VALUE),int arity); __attribute__((__unused__,__weakref__("rb_define_method_id"),__nonnull__ (3)))static void rb_define_method_id2(VALUE klass, ID name,VALUE(*func)(VALUE,VALUE,VALUE),int arity); __attribute__((__unused__,__weakref__("rb_define_method_id"),__nonnull__ (3)))static void rb_define_method_id3(VALUE klass, ID name,VALUE(*func)(VALUE,VALUE,VALUE,VALUE),int arity); __attribute__((__unused__,__weakref__("rb_define_method_id"),__nonnull__ (3)))static void rb_define_method_id4(VALUE klass, ID name,VALUE(*func)(VALUE,VALUE,VALUE,VALUE,VALUE),int arity); __attribute__((__unused__,__weakref__("rb_define_method_id"),__nonnull__ (3)))static void rb_define_method_id5(VALUE klass, ID name,VALUE(*func)(VALUE,VALUE,VALUE,VALUE,VALUE,VALUE),int arity); __attribute__((__unused__,__weakref__("rb_define_method_id"),__nonnull__ (3)))static void rb_define_method_id6(VALUE klass, ID name,VALUE(*func)(VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE),int arity); __attribute__((__unused__,__weakref__("rb_define_method_id"),__nonnull__ (3)))static void rb_define_method_id7(VALUE klass, ID name,VALUE(*func)(VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE),int arity); __attribute__((__unused__,__weakref__("rb_define_method_id"),__nonnull__ (3)))static void rb_define_method_id8(VALUE klass, ID name,VALUE(*func)(VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE),int arity); __attribute__((__unused__,__weakref__("rb_define_method_id"),__nonnull__ (3)))static void rb_define_method_id9(VALUE klass, ID name,VALUE(*func)(VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE),int arity); __attribute__((__unused__,__weakref__("rb_define_method_id"),__nonnull__ (3)))static void rb_define_method_id10(VALUE klass, ID name,VALUE(*func)(VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE),int arity); __attribute__((__unused__,__weakref__("rb_define_method_id"),__nonnull__ (3)))static void rb_define_method_id11(VALUE klass, ID name,VALUE(*func)(VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE),int arity); __attribute__((__unused__,__weakref__("rb_define_method_id"),__nonnull__ (3)))static void rb_define_method_id12(VALUE klass, ID name,VALUE(*func)(VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE),int arity); __attribute__((__unused__,__weakref__("rb_define_method_id"),__nonnull__ (3)))static void rb_define_method_id13(VALUE klass, ID name,VALUE(*func)(VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE),int arity); __attribute__((__unused__,__weakref__("rb_define_method_id"),__nonnull__ (3)))static void rb_define_method_id14(VALUE klass, ID name,VALUE(*func)(VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE),int arity); __attribute__((__unused__,__weakref__("rb_define_method_id"),__nonnull__ (3)))static void rb_define_method_id15(VALUE klass, ID name,VALUE(*func)(VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE),int arity); __attribute__((__unused__,__weakref__("rb_define_method_id"),__nonnull__ (3)))static void rb_define_method_idm3(VALUE klass, ID name,VALUE(*func)(),int arity); __attribute__((__unused__,__weakref__("rb_define_method_id"),__nonnull__ (3)))static void rb_define_method_idm2(VALUE klass, ID name,VALUE(*func)(VALUE,VALUE),int arity); __attribute__((__unused__,__weakref__("rb_define_method_id"),__nonnull__ (3)))static void rb_define_method_idm1(VALUE klass, ID name,VALUE(*func)(int,union{VALUE*x;const VALUE*y;}__attribute__((__transparent_union__)),VALUE),int arity);
4848 __attribute__((__unused__,__weakref__("rb_define_protected_method"),__nonnull__ (2,3)))static void rb_define_protected_method0(VALUE klass, const char *name,VALUE(*func)(VALUE),int arity); __attribute__((__unused__,__weakref__("rb_define_protected_method"),__nonnull__ (2,3)))static void rb_define_protected_method1(VALUE klass, const char *name,VALUE(*func)(VALUE,VALUE),int arity); __attribute__((__unused__,__weakref__("rb_define_protected_method"),__nonnull__ (2,3)))static void rb_define_protected_method2(VALUE klass, const char *name,VALUE(*func)(VALUE,VALUE,VALUE),int arity); __attribute__((__unused__,__weakref__("rb_define_protected_method"),__nonnull__ (2,3)))static void rb_define_protected_method3(VALUE klass, const char *name,VALUE(*func)(VALUE,VALUE,VALUE,VALUE),int arity); __attribute__((__unused__,__weakref__("rb_define_protected_method"),__nonnull__ (2,3)))static void rb_define_protected_method4(VALUE klass, const char *name,VALUE(*func)(VALUE,VALUE,VALUE,VALUE,VALUE),int arity); __attribute__((__unused__,__weakref__("rb_define_protected_method"),__nonnull__ (2,3)))static void rb_define_protected_method5(VALUE klass, const char *name,VALUE(*func)(VALUE,VALUE,VALUE,VALUE,VALUE,VALUE),int arity); __attribute__((__unused__,__weakref__("rb_define_protected_method"),__nonnull__ (2,3)))static void rb_define_protected_method6(VALUE klass, const char *name,VALUE(*func)(VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE),int arity); __attribute__((__unused__,__weakref__("rb_define_protected_method"),__nonnull__ (2,3)))static void rb_define_protected_method7(VALUE klass, const char *name,VALUE(*func)(VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE),int arity); __attribute__((__unused__,__weakref__("rb_define_protected_method"),__nonnull__ (2,3)))static void rb_define_protected_method8(VALUE klass, const char *name,VALUE(*func)(VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE),int arity); __attribute__((__unused__,__weakref__("rb_define_protected_method"),__nonnull__ (2,3)))static void rb_define_protected_method9(VALUE klass, const char *name,VALUE(*func)(VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE),int arity); __attribute__((__unused__,__weakref__("rb_define_protected_method"),__nonnull__ (2,3)))static void rb_define_protected_method10(VALUE klass, const char *name,VALUE(*func)(VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE),int arity); __attribute__((__unused__,__weakref__("rb_define_protected_method"),__nonnull__ (2,3)))static void rb_define_protected_method11(VALUE klass, const char *name,VALUE(*func)(VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE),int arity); __attribute__((__unused__,__weakref__("rb_define_protected_method"),__nonnull__ (2,3)))static void rb_define_protected_method12(VALUE klass, const char *name,VALUE(*func)(VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE),int arity); __attribute__((__unused__,__weakref__("rb_define_protected_method"),__nonnull__ (2,3)))static void rb_define_protected_method13(VALUE klass, const char *name,VALUE(*func)(VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE),int arity); __attribute__((__unused__,__weakref__("rb_define_protected_method"),__nonnull__ (2,3)))static void rb_define_protected_method14(VALUE klass, const char *name,VALUE(*func)(VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE),int arity); __attribute__((__unused__,__weakref__("rb_define_protected_method"),__nonnull__ (2,3)))static void rb_define_protected_method15(VALUE klass, const char *name,VALUE(*func)(VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE),int arity); __attribute__((__unused__,__weakref__("rb_define_protected_method"),__nonnull__ (2,3)))static void rb_define_protected_methodm3(VALUE klass, const char *name,VALUE(*func)(),int arity); __attribute__((__unused__,__weakref__("rb_define_protected_method"),__nonnull__ (2,3)))static void rb_define_protected_methodm2(VALUE klass, const char *name,VALUE(*func)(VALUE,VALUE),int arity); __attribute__((__unused__,__weakref__("rb_define_protected_method"),__nonnull__ (2,3)))static void rb_define_protected_methodm1(VALUE klass, const char *name,VALUE(*func)(int,union{VALUE*x;const VALUE*y;}__attribute__((__transparent_union__)),VALUE),int arity);
4849 __attribute__((__unused__,__weakref__("rb_define_private_method"),__nonnull__ (2,3)))static void rb_define_private_method0(VALUE klass, const char *name,VALUE(*func)(VALUE),int arity); __attribute__((__unused__,__weakref__("rb_define_private_method"),__nonnull__ (2,3)))static void rb_define_private_method1(VALUE klass, const char *name,VALUE(*func)(VALUE,VALUE),int arity); __attribute__((__unused__,__weakref__("rb_define_private_method"),__nonnull__ (2,3)))static void rb_define_private_method2(VALUE klass, const char *name,VALUE(*func)(VALUE,VALUE,VALUE),int arity); __attribute__((__unused__,__weakref__("rb_define_private_method"),__nonnull__ (2,3)))static void rb_define_private_method3(VALUE klass, const char *name,VALUE(*func)(VALUE,VALUE,VALUE,VALUE),int arity); __attribute__((__unused__,__weakref__("rb_define_private_method"),__nonnull__ (2,3)))static void rb_define_private_method4(VALUE klass, const char *name,VALUE(*func)(VALUE,VALUE,VALUE,VALUE,VALUE),int arity); __attribute__((__unused__,__weakref__("rb_define_private_method"),__nonnull__ (2,3)))static void rb_define_private_method5(VALUE klass, const char *name,VALUE(*func)(VALUE,VALUE,VALUE,VALUE,VALUE,VALUE),int arity); __attribute__((__unused__,__weakref__("rb_define_private_method"),__nonnull__ (2,3)))static void rb_define_private_method6(VALUE klass, const char *name,VALUE(*func)(VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE),int arity); __attribute__((__unused__,__weakref__("rb_define_private_method"),__nonnull__ (2,3)))static void rb_define_private_method7(VALUE klass, const char *name,VALUE(*func)(VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE),int arity); __attribute__((__unused__,__weakref__("rb_define_private_method"),__nonnull__ (2,3)))static void rb_define_private_method8(VALUE klass, const char *name,VALUE(*func)(VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE),int arity); __attribute__((__unused__,__weakref__("rb_define_private_method"),__nonnull__ (2,3)))static void rb_define_private_method9(VALUE klass, const char *name,VALUE(*func)(VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE),int arity); __attribute__((__unused__,__weakref__("rb_define_private_method"),__nonnull__ (2,3)))static void rb_define_private_method10(VALUE klass, const char *name,VALUE(*func)(VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE),int arity); __attribute__((__unused__,__weakref__("rb_define_private_method"),__nonnull__ (2,3)))static void rb_define_private_method11(VALUE klass, const char *name,VALUE(*func)(VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE),int arity); __attribute__((__unused__,__weakref__("rb_define_private_method"),__nonnull__ (2,3)))static void rb_define_private_method12(VALUE klass, const char *name,VALUE(*func)(VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE),int arity); __attribute__((__unused__,__weakref__("rb_define_private_method"),__nonnull__ (2,3)))static void rb_define_private_method13(VALUE klass, const char *name,VALUE(*func)(VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE),int arity); __attribute__((__unused__,__weakref__("rb_define_private_method"),__nonnull__ (2,3)))static void rb_define_private_method14(VALUE klass, const char *name,VALUE(*func)(VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE),int arity); __attribute__((__unused__,__weakref__("rb_define_private_method"),__nonnull__ (2,3)))static void rb_define_private_method15(VALUE klass, const char *name,VALUE(*func)(VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE),int arity); __attribute__((__unused__,__weakref__("rb_define_private_method"),__nonnull__ (2,3)))static void rb_define_private_methodm3(VALUE klass, const char *name,VALUE(*func)(),int arity); __attribute__((__unused__,__weakref__("rb_define_private_method"),__nonnull__ (2,3)))static void rb_define_private_methodm2(VALUE klass, const char *name,VALUE(*func)(VALUE,VALUE),int arity); __attribute__((__unused__,__weakref__("rb_define_private_method"),__nonnull__ (2,3)))static void rb_define_private_methodm1(VALUE klass, const char *name,VALUE(*func)(int,union{VALUE*x;const VALUE*y;}__attribute__((__transparent_union__)),VALUE),int arity);
4850 __attribute__((__unused__,__weakref__("rb_define_singleton_method"),__nonnull__ (2,3)))static void rb_define_singleton_method0(VALUE klass, const char *name,VALUE(*func)(VALUE),int arity); __attribute__((__unused__,__weakref__("rb_define_singleton_method"),__nonnull__ (2,3)))static void rb_define_singleton_method1(VALUE klass, const char *name,VALUE(*func)(VALUE,VALUE),int arity); __attribute__((__unused__,__weakref__("rb_define_singleton_method"),__nonnull__ (2,3)))static void rb_define_singleton_method2(VALUE klass, const char *name,VALUE(*func)(VALUE,VALUE,VALUE),int arity); __attribute__((__unused__,__weakref__("rb_define_singleton_method"),__nonnull__ (2,3)))static void rb_define_singleton_method3(VALUE klass, const char *name,VALUE(*func)(VALUE,VALUE,VALUE,VALUE),int arity); __attribute__((__unused__,__weakref__("rb_define_singleton_method"),__nonnull__ (2,3)))static void rb_define_singleton_method4(VALUE klass, const char *name,VALUE(*func)(VALUE,VALUE,VALUE,VALUE,VALUE),int arity); __attribute__((__unused__,__weakref__("rb_define_singleton_method"),__nonnull__ (2,3)))static void rb_define_singleton_method5(VALUE klass, const char *name,VALUE(*func)(VALUE,VALUE,VALUE,VALUE,VALUE,VALUE),int arity); __attribute__((__unused__,__weakref__("rb_define_singleton_method"),__nonnull__ (2,3)))static void rb_define_singleton_method6(VALUE klass, const char *name,VALUE(*func)(VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE),int arity); __attribute__((__unused__,__weakref__("rb_define_singleton_method"),__nonnull__ (2,3)))static void rb_define_singleton_method7(VALUE klass, const char *name,VALUE(*func)(VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE),int arity); __attribute__((__unused__,__weakref__("rb_define_singleton_method"),__nonnull__ (2,3)))static void rb_define_singleton_method8(VALUE klass, const char *name,VALUE(*func)(VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE),int arity); __attribute__((__unused__,__weakref__("rb_define_singleton_method"),__nonnull__ (2,3)))static void rb_define_singleton_method9(VALUE klass, const char *name,VALUE(*func)(VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE),int arity); __attribute__((__unused__,__weakref__("rb_define_singleton_method"),__nonnull__ (2,3)))static void rb_define_singleton_method10(VALUE klass, const char *name,VALUE(*func)(VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE),int arity); __attribute__((__unused__,__weakref__("rb_define_singleton_method"),__nonnull__ (2,3)))static void rb_define_singleton_method11(VALUE klass, const char *name,VALUE(*func)(VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE),int arity); __attribute__((__unused__,__weakref__("rb_define_singleton_method"),__nonnull__ (2,3)))static void rb_define_singleton_method12(VALUE klass, const char *name,VALUE(*func)(VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE),int arity); __attribute__((__unused__,__weakref__("rb_define_singleton_method"),__nonnull__ (2,3)))static void rb_define_singleton_method13(VALUE klass, const char *name,VALUE(*func)(VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE),int arity); __attribute__((__unused__,__weakref__("rb_define_singleton_method"),__nonnull__ (2,3)))static void rb_define_singleton_method14(VALUE klass, const char *name,VALUE(*func)(VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE),int arity); __attribute__((__unused__,__weakref__("rb_define_singleton_method"),__nonnull__ (2,3)))static void rb_define_singleton_method15(VALUE klass, const char *name,VALUE(*func)(VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE),int arity); __attribute__((__unused__,__weakref__("rb_define_singleton_method"),__nonnull__ (2,3)))static void rb_define_singleton_methodm3(VALUE klass, const char *name,VALUE(*func)(),int arity); __attribute__((__unused__,__weakref__("rb_define_singleton_method"),__nonnull__ (2,3)))static void rb_define_singleton_methodm2(VALUE klass, const char *name,VALUE(*func)(VALUE,VALUE),int arity); __attribute__((__unused__,__weakref__("rb_define_singleton_method"),__nonnull__ (2,3)))static void rb_define_singleton_methodm1(VALUE klass, const char *name,VALUE(*func)(int,union{VALUE*x;const VALUE*y;}__attribute__((__transparent_union__)),VALUE),int arity);
4851static inline void
4852rb_clone_setup(VALUE clone, VALUE obj)
4853{
4854 rb_obj_setup(clone, rb_singleton_class_clone(obj),
4855 ((struct RBasic*)(obj))->flags & ~(((VALUE)RUBY_FL_PROMOTED0)|((VALUE)RUBY_FL_PROMOTED1)|((VALUE)RUBY_FL_FINALIZE)));
4856 rb_singleton_class_attached((((struct RBasic*)(clone))->klass), clone);
4857 if (((!(((VALUE)(obj) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(obj) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(obj))->flags & RUBY_T_MASK) != RUBY_T_NODE)?(((struct RBasic*)((obj)))->flags&((RUBY_FL_EXIVAR))):0)) rb_copy_generic_ivar(clone, obj);
4858}
4859static inline void
4860rb_dup_setup(VALUE dup, VALUE obj)
4861{
4862 rb_obj_setup(dup, rb_obj_class(obj), (((struct RBasic*)(obj))->flags&(RUBY_FL_DUPPED)));
4863 if (((!(((VALUE)(obj) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(obj) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(obj))->flags & RUBY_T_MASK) != RUBY_T_NODE)?(((struct RBasic*)((obj)))->flags&((RUBY_FL_EXIVAR))):0)) rb_copy_generic_ivar(dup, obj);
4864}
4865static inline long
4866rb_array_len(VALUE a)
4867{
4868 return (((struct RBasic*)(a))->flags & (VALUE)RARRAY_EMBED_FLAG) ?
4869 (long)((((struct RBasic*)(a))->flags >> RARRAY_EMBED_LEN_SHIFT) & ((VALUE)RARRAY_EMBED_LEN_MASK >> RARRAY_EMBED_LEN_SHIFT)) : ((struct RArray*)(a))->as.heap.len;
4870}
4871static inline const VALUE *
4872rb_array_const_ptr_transient(VALUE a)
4873{
4874 return ((((struct RBasic*)(a))->flags & (VALUE)RARRAY_EMBED_FLAG) ? ((struct RArray*)(a))->as.ary : ((struct RArray*)(a))->as.heap.ptr);
4875}
4876static inline const VALUE *
4877rb_array_const_ptr(VALUE a)
4878{
4879 void rb_ary_detransient(VALUE a);
4880 if ((((struct RBasic*)((a)))->flags&(RARRAY_TRANSIENT_FLAG))) {
4882 }
4883 return rb_array_const_ptr_transient(a);
4884}
4885static inline VALUE *
4886rb_array_ptr_use_start(VALUE a, int allow_transient)
4887{
4888 VALUE *rb_ary_ptr_use_start(VALUE ary);
4889 if (!allow_transient) {
4890 if ((((struct RBasic*)((a)))->flags&(RARRAY_TRANSIENT_FLAG))) {
4891 void rb_ary_detransient(VALUE a);
4893 }
4894 }
4895 (void)allow_transient;
4896 return rb_ary_ptr_use_start(a);
4897}
4898static inline void
4899rb_array_ptr_use_end(VALUE a, int allow_transient)
4900{
4901 void rb_ary_ptr_use_end(VALUE a);
4902 rb_ary_ptr_use_end(a);
4903 (void)allow_transient;
4904}
4905int ruby_native_thread_p(void);
4906typedef uint32_t rb_event_flag_t;
4907typedef void (*rb_event_hook_func_t)(rb_event_flag_t evflag, VALUE data, VALUE self, ID mid, VALUE klass);
4908void rb_add_event_hook(rb_event_hook_func_t func, rb_event_flag_t events, VALUE data);
4910static inline int rb_isascii(int c){ return '\0' <= c && c <= '\x7f'; }
4911static inline int rb_isupper(int c){ return 'A' <= c && c <= 'Z'; }
4912static inline int rb_islower(int c){ return 'a' <= c && c <= 'z'; }
4913static inline int rb_isalpha(int c){ return rb_isupper(c) || rb_islower(c); }
4914static inline int rb_isdigit(int c){ return '0' <= c && c <= '9'; }
4915static inline int rb_isalnum(int c){ return rb_isalpha(c) || rb_isdigit(c); }
4916static inline int rb_isxdigit(int c){ return rb_isdigit(c) || ('A' <= c && c <= 'F') || ('a' <= c && c <= 'f'); }
4917static inline int rb_isblank(int c){ return c == ' ' || c == '\t'; }
4918static inline int rb_isspace(int c){ return c == ' ' || ('\t' <= c && c <= '\r'); }
4919static inline int rb_iscntrl(int c){ return ('\0' <= c && c < ' ') || c == '\x7f'; }
4920static inline int rb_isprint(int c){ return ' ' <= c && c <= '\x7e'; }
4921static inline int rb_ispunct(int c){ return !rb_isalnum(c); }
4922static inline int rb_isgraph(int c){ return '!' <= c && c <= '\x7e'; }
4923static inline int rb_tolower(int c) { return rb_isupper(c) ? (c|0x20) : c; }
4924static inline int rb_toupper(int c) { return rb_islower(c) ? (c&0x5f) : c; }
4925int rb_st_locale_insensitive_strcasecmp(const char *s1, const char *s2);
4926int rb_st_locale_insensitive_strncasecmp(const char *s1, const char *s2, size_t n);
4927unsigned long ruby_strtoul(const char *str, char **endptr, int base);
4928int ruby_snprintf(char *str, size_t n, char const *fmt, ...) __attribute__((format(printf, 3, 4)));
4929int ruby_vsnprintf(char *str, size_t n, char const *fmt, va_list ap);
4930int rb_empty_keyword_given_p(void);
4931__attribute__ ((__error__ ("bad scan arg format"))) void rb_scan_args_bad_format(const char*);
4932__attribute__ ((__error__ ("variable argument length doesn't match"))) void rb_scan_args_length_mismatch(const char*,int);
4933__attribute__ ((__always_inline__)) static int rb_scan_args_lead_p(const char *fmt);
4934static inline int
4935rb_scan_args_lead_p(const char *fmt)
4936{
4937 return ((unsigned char)((fmt[0])-'0')<10);
4938}
4939__attribute__ ((__always_inline__)) static int rb_scan_args_n_lead(const char *fmt);
4940static inline int
4941rb_scan_args_n_lead(const char *fmt)
4942{
4943 return (rb_scan_args_lead_p(fmt) ? fmt[0]-'0' : 0);
4944}
4945__attribute__ ((__always_inline__)) static int rb_scan_args_opt_p(const char *fmt);
4946static inline int
4947rb_scan_args_opt_p(const char *fmt)
4948{
4949 return (rb_scan_args_lead_p(fmt) && ((unsigned char)((fmt[1])-'0')<10));
4950}
4951__attribute__ ((__always_inline__)) static int rb_scan_args_n_opt(const char *fmt);
4952static inline int
4953rb_scan_args_n_opt(const char *fmt)
4954{
4955 return (rb_scan_args_opt_p(fmt) ? fmt[1]-'0' : 0);
4956}
4957__attribute__ ((__always_inline__)) static int rb_scan_args_var_idx(const char *fmt);
4958static inline int
4959rb_scan_args_var_idx(const char *fmt)
4960{
4961 return (!rb_scan_args_lead_p(fmt) ? 0 : !((unsigned char)((fmt[1])-'0')<10) ? 1 : 2);
4962}
4963__attribute__ ((__always_inline__)) static int rb_scan_args_f_var(const char *fmt);
4964static inline int
4965rb_scan_args_f_var(const char *fmt)
4966{
4967 return (fmt[rb_scan_args_var_idx(fmt)]=='*');
4968}
4969__attribute__ ((__always_inline__)) static int rb_scan_args_trail_idx(const char *fmt);
4970static inline int
4971rb_scan_args_trail_idx(const char *fmt)
4972{
4973 const int idx = rb_scan_args_var_idx(fmt);
4974 return idx+(fmt[idx]=='*');
4975}
4976__attribute__ ((__always_inline__)) static int rb_scan_args_n_trail(const char *fmt);
4977static inline int
4978rb_scan_args_n_trail(const char *fmt)
4979{
4980 const int idx = rb_scan_args_trail_idx(fmt);
4981 return (((unsigned char)((fmt[idx])-'0')<10) ? fmt[idx]-'0' : 0);
4982}
4983__attribute__ ((__always_inline__)) static int rb_scan_args_hash_idx(const char *fmt);
4984static inline int
4985rb_scan_args_hash_idx(const char *fmt)
4986{
4987 const int idx = rb_scan_args_trail_idx(fmt);
4988 return idx+((unsigned char)((fmt[idx])-'0')<10);
4989}
4990__attribute__ ((__always_inline__)) static int rb_scan_args_f_hash(const char *fmt);
4991static inline int
4992rb_scan_args_f_hash(const char *fmt)
4993{
4994 return (fmt[rb_scan_args_hash_idx(fmt)]==':');
4995}
4996__attribute__ ((__always_inline__)) static int rb_scan_args_block_idx(const char *fmt);
4997static inline int
4998rb_scan_args_block_idx(const char *fmt)
4999{
5000 const int idx = rb_scan_args_hash_idx(fmt);
5001 return idx+(fmt[idx]==':');
5002}
5003__attribute__ ((__always_inline__)) static int rb_scan_args_f_block(const char *fmt);
5004static inline int
5005rb_scan_args_f_block(const char *fmt)
5006{
5007 return (fmt[rb_scan_args_block_idx(fmt)]=='&');
5008}static inline
5009__attribute__ ((__always_inline__)) int rb_scan_args_set(int argc, const VALUE *argv, int n_lead, int n_opt, int n_trail, int f_var, int f_hash, int f_block, VALUE *vars[], char *fmt, int varc);static inline
5010 int
5011rb_scan_args_set(int argc, const VALUE *argv,
5012 int n_lead, int n_opt, int n_trail,
5013 int f_var, int f_hash, int f_block,
5014 VALUE *vars[], char *fmt __attribute__ ((unused)), int varc __attribute__ ((unused)))
5015{
5016 int i, argi = 0, vari = 0, last_idx = -1;
5017 VALUE *var, hash = ((VALUE)RUBY_Qnil), last_hash = 0;
5018 const int n_mand = n_lead + n_trail;
5019 int keyword_given = rb_keyword_given_p();
5020 int empty_keyword_given = 0;
5021 VALUE tmp_buffer = 0;
5022 if (!keyword_given) {
5023 empty_keyword_given = rb_empty_keyword_given_p();
5024 }
5025 if (argc > 0 && !(f_hash && empty_keyword_given)) {
5026 VALUE last = argv[argc - 1];
5027 if (f_hash && n_mand < argc) {
5028 if (keyword_given) {
5029 if (!( ((RUBY_T_HASH) == RUBY_T_FIXNUM) ? (((int)(long)(last))&RUBY_FIXNUM_FLAG) : ((RUBY_T_HASH) == RUBY_T_TRUE) ? ((last) == ((VALUE)RUBY_Qtrue)) : ((RUBY_T_HASH) == RUBY_T_FALSE) ? ((last) == ((VALUE)RUBY_Qfalse)) : ((RUBY_T_HASH) == RUBY_T_NIL) ? ((last) == ((VALUE)RUBY_Qnil)) : ((RUBY_T_HASH) == RUBY_T_UNDEF) ? ((last) == ((VALUE)RUBY_Qundef)) : ((RUBY_T_HASH) == RUBY_T_SYMBOL) ? ((((VALUE)(last)&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG)||(!(((VALUE)(last) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(last) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(last))->flags & RUBY_T_MASK) == (RUBY_T_SYMBOL))) : ((RUBY_T_HASH) == RUBY_T_FLOAT) ? ( ((((int)(long)(last))&RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG) || (!(((VALUE)(last) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(last) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(last))->flags & RUBY_T_MASK) == RUBY_T_FLOAT)) : (!(((VALUE)(last) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(last) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(last))->flags & RUBY_T_MASK) == (RUBY_T_HASH)))) {
5030 rb_warn("Keyword flag set when calling rb_scan_args, but last entry is not a hash");
5031 }
5032 else {
5033 hash = last;
5034 }
5035 }
5036 else if (!((VALUE)(last) != ((VALUE)RUBY_Qnil))) {
5037 if (!f_var && n_mand + n_opt < argc) {
5038 rb_warn("The last argument is nil, treating as empty keywords");
5039 argc--;
5040 }
5041 }
5042 else {
5043 hash = rb_check_hash_type(last);
5044 }
5045 if (!!((VALUE)(hash) != ((VALUE)RUBY_Qnil))) {
5046 VALUE opts = rb_extract_keywords(&hash);
5047 if (!(last_hash = hash)) {
5048 if (!keyword_given) {
5049 rb_warn("Using the last argument as keyword parameters is deprecated");
5050 }
5051 argc--;
5052 }
5053 else {
5054 rb_warn("The last argument is split into positional and keyword parameters");
5055 last_idx = argc - 1;
5056 }
5057 hash = opts ? opts : ((VALUE)RUBY_Qnil);
5058 }
5059 }
5060 else if (f_hash && keyword_given && n_mand == argc) {
5061 rb_warn("Passing the keyword argument as the last hash parameter is deprecated");
5062 }
5063 }
5064 if (f_hash && n_mand > 0 && n_mand == argc+1 && empty_keyword_given) {
5065 VALUE *ptr = (VALUE *)rb_alloc_tmp_buffer2(&tmp_buffer, argc+1, sizeof(VALUE));
5066 ruby_nonempty_memcpy(ptr, argv, sizeof(VALUE)*argc);
5067 ptr[argc] = rb_hash_new();
5068 argc++;
5069 *(&argv) = ptr;
5070 rb_warn("Passing the keyword argument as the last hash parameter is deprecated");
5071 }
5072 if (argc < n_mand) {
5073 goto argc_error;
5074 }
5075 for (i = n_lead; i-- > 0; ) {
5076 var = vars[vari++];
5077 if (var) *var = (argi == last_idx) ? last_hash : argv[argi];
5078 argi++;
5079 }
5080 for (i = n_opt; i-- > 0; ) {
5081 var = vars[vari++];
5082 if (argi < argc - n_trail) {
5083 if (var) *var = (argi == last_idx) ? last_hash : argv[argi];
5084 argi++;
5085 }
5086 else {
5087 if (var) *var = ((VALUE)RUBY_Qnil);
5088 }
5089 }
5090 if (f_var) {
5091 int n_var = argc - argi - n_trail;
5092 var = vars[vari++];
5093 if (0 < n_var) {
5094 if (var) {
5095 int f_last = (last_idx + 1 == argc - n_trail);
5096 *var = rb_ary_new_from_values(n_var-f_last, &argv[argi]);
5097 if (f_last) rb_ary_push(*var, last_hash);
5098 }
5099 argi += n_var;
5100 }
5101 else {
5102 if (var) *var = rb_ary_new();
5103 }
5104 }
5105 for (i = n_trail; i-- > 0; ) {
5106 var = vars[vari++];
5107 if (var) *var = (argi == last_idx) ? last_hash : argv[argi];
5108 argi++;
5109 }
5110 if (f_hash) {
5111 var = vars[vari++];
5112 if (var) *var = hash;
5113 }
5114 if (f_block) {
5115 var = vars[vari++];
5116 if (rb_block_given_p()) {
5117 *var = rb_block_proc();
5118 }
5119 else {
5120 *var = ((VALUE)RUBY_Qnil);
5121 }
5122 }
5123 if (argi < argc) {
5124 argc_error:
5125 if (tmp_buffer) rb_free_tmp_buffer(&tmp_buffer);
5126 rb_error_arity(argc, n_mand, f_var ? (-1) : n_mand + n_opt);
5127 }
5128 if (tmp_buffer) rb_free_tmp_buffer(&tmp_buffer);
5129 return argc;
5130}
5131void ruby_sysinit(int *argc, char ***argv);
5132void ruby_init(void);
5133void* ruby_options(int argc, char** argv);
5134int ruby_executable_node(void *n, int *status);
5135int ruby_run_node(void *n);
5136void ruby_show_version(void);
5137void ruby_show_copyright(void);
5138void ruby_init_stack(volatile VALUE*);
5139int ruby_setup(void);
5140int ruby_cleanup(volatile int);
5141void ruby_finalize(void);
5142__attribute__ ((__noreturn__)) void ruby_stop(int);
5143void ruby_set_stack_size(size_t);
5144int ruby_stack_check(void);
5145size_t ruby_stack_length(VALUE**);
5146int ruby_exec_node(void *n);
5147void ruby_script(const char* name);
5148void ruby_set_script_name(VALUE name);
5149void ruby_prog_init(void);
5150void ruby_set_argv(int, char**);
5151void *ruby_process_options(int, char**);
5152void ruby_init_loadpath(void);
5153void ruby_incpush(const char*);
5154void ruby_sig_finalize(void);
5155
5156
5157 __attribute__((__unused__,__weakref__("rb_define_method"),__nonnull__ (2,3)))static void rb_define_method0(VALUE klass, const char *name,VALUE(*func)(VALUE),int arity); __attribute__((__unused__,__weakref__("rb_define_method"),__nonnull__ (2,3)))static void rb_define_method1(VALUE klass, const char *name,VALUE(*func)(VALUE,VALUE),int arity); __attribute__((__unused__,__weakref__("rb_define_method"),__nonnull__ (2,3)))static void rb_define_method2(VALUE klass, const char *name,VALUE(*func)(VALUE,VALUE,VALUE),int arity); __attribute__((__unused__,__weakref__("rb_define_method"),__nonnull__ (2,3)))static void rb_define_method3(VALUE klass, const char *name,VALUE(*func)(VALUE,VALUE,VALUE,VALUE),int arity); __attribute__((__unused__,__weakref__("rb_define_method"),__nonnull__ (2,3)))static void rb_define_method4(VALUE klass, const char *name,VALUE(*func)(VALUE,VALUE,VALUE,VALUE,VALUE),int arity); __attribute__((__unused__,__weakref__("rb_define_method"),__nonnull__ (2,3)))static void rb_define_method5(VALUE klass, const char *name,VALUE(*func)(VALUE,VALUE,VALUE,VALUE,VALUE,VALUE),int arity); __attribute__((__unused__,__weakref__("rb_define_method"),__nonnull__ (2,3)))static void rb_define_method6(VALUE klass, const char *name,VALUE(*func)(VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE),int arity); __attribute__((__unused__,__weakref__("rb_define_method"),__nonnull__ (2,3)))static void rb_define_method7(VALUE klass, const char *name,VALUE(*func)(VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE),int arity); __attribute__((__unused__,__weakref__("rb_define_method"),__nonnull__ (2,3)))static void rb_define_method8(VALUE klass, const char *name,VALUE(*func)(VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE),int arity); __attribute__((__unused__,__weakref__("rb_define_method"),__nonnull__ (2,3)))static void rb_define_method9(VALUE klass, const char *name,VALUE(*func)(VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE),int arity); __attribute__((__unused__,__weakref__("rb_define_method"),__nonnull__ (2,3)))static void rb_define_method10(VALUE klass, const char *name,VALUE(*func)(VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE),int arity); __attribute__((__unused__,__weakref__("rb_define_method"),__nonnull__ (2,3)))static void rb_define_method11(VALUE klass, const char *name,VALUE(*func)(VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE),int arity); __attribute__((__unused__,__weakref__("rb_define_method"),__nonnull__ (2,3)))static void rb_define_method12(VALUE klass, const char *name,VALUE(*func)(VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE),int arity); __attribute__((__unused__,__weakref__("rb_define_method"),__nonnull__ (2,3)))static void rb_define_method13(VALUE klass, const char *name,VALUE(*func)(VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE),int arity); __attribute__((__unused__,__weakref__("rb_define_method"),__nonnull__ (2,3)))static void rb_define_method14(VALUE klass, const char *name,VALUE(*func)(VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE),int arity); __attribute__((__unused__,__weakref__("rb_define_method"),__nonnull__ (2,3)))static void rb_define_method15(VALUE klass, const char *name,VALUE(*func)(VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE),int arity); __attribute__((__unused__,__weakref__("rb_define_method"),__nonnull__ (2,3)))static void rb_define_methodm3(VALUE klass, const char *name,VALUE(*func)(),int arity); __attribute__((__unused__,__weakref__("rb_define_method"),__nonnull__ (2,3)))static void rb_define_methodm2(VALUE klass, const char *name,VALUE(*func)(VALUE,VALUE),int arity); __attribute__((__unused__,__weakref__("rb_define_method"),__nonnull__ (2,3)))static void rb_define_methodm1(VALUE klass, const char *name,VALUE(*func)(int,union{VALUE*x;const VALUE*y;}__attribute__((__transparent_union__)),VALUE),int arity);
5158 __attribute__((__unused__,__weakref__("rb_define_module_function"),__nonnull__ (2,3)))static void rb_define_module_function0(VALUE klass, const char *name,VALUE(*func)(VALUE),int arity); __attribute__((__unused__,__weakref__("rb_define_module_function"),__nonnull__ (2,3)))static void rb_define_module_function1(VALUE klass, const char *name,VALUE(*func)(VALUE,VALUE),int arity); __attribute__((__unused__,__weakref__("rb_define_module_function"),__nonnull__ (2,3)))static void rb_define_module_function2(VALUE klass, const char *name,VALUE(*func)(VALUE,VALUE,VALUE),int arity); __attribute__((__unused__,__weakref__("rb_define_module_function"),__nonnull__ (2,3)))static void rb_define_module_function3(VALUE klass, const char *name,VALUE(*func)(VALUE,VALUE,VALUE,VALUE),int arity); __attribute__((__unused__,__weakref__("rb_define_module_function"),__nonnull__ (2,3)))static void rb_define_module_function4(VALUE klass, const char *name,VALUE(*func)(VALUE,VALUE,VALUE,VALUE,VALUE),int arity); __attribute__((__unused__,__weakref__("rb_define_module_function"),__nonnull__ (2,3)))static void rb_define_module_function5(VALUE klass, const char *name,VALUE(*func)(VALUE,VALUE,VALUE,VALUE,VALUE,VALUE),int arity); __attribute__((__unused__,__weakref__("rb_define_module_function"),__nonnull__ (2,3)))static void rb_define_module_function6(VALUE klass, const char *name,VALUE(*func)(VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE),int arity); __attribute__((__unused__,__weakref__("rb_define_module_function"),__nonnull__ (2,3)))static void rb_define_module_function7(VALUE klass, const char *name,VALUE(*func)(VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE),int arity); __attribute__((__unused__,__weakref__("rb_define_module_function"),__nonnull__ (2,3)))static void rb_define_module_function8(VALUE klass, const char *name,VALUE(*func)(VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE),int arity); __attribute__((__unused__,__weakref__("rb_define_module_function"),__nonnull__ (2,3)))static void rb_define_module_function9(VALUE klass, const char *name,VALUE(*func)(VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE),int arity); __attribute__((__unused__,__weakref__("rb_define_module_function"),__nonnull__ (2,3)))static void rb_define_module_function10(VALUE klass, const char *name,VALUE(*func)(VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE),int arity); __attribute__((__unused__,__weakref__("rb_define_module_function"),__nonnull__ (2,3)))static void rb_define_module_function11(VALUE klass, const char *name,VALUE(*func)(VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE),int arity); __attribute__((__unused__,__weakref__("rb_define_module_function"),__nonnull__ (2,3)))static void rb_define_module_function12(VALUE klass, const char *name,VALUE(*func)(VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE),int arity); __attribute__((__unused__,__weakref__("rb_define_module_function"),__nonnull__ (2,3)))static void rb_define_module_function13(VALUE klass, const char *name,VALUE(*func)(VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE),int arity); __attribute__((__unused__,__weakref__("rb_define_module_function"),__nonnull__ (2,3)))static void rb_define_module_function14(VALUE klass, const char *name,VALUE(*func)(VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE),int arity); __attribute__((__unused__,__weakref__("rb_define_module_function"),__nonnull__ (2,3)))static void rb_define_module_function15(VALUE klass, const char *name,VALUE(*func)(VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE),int arity); __attribute__((__unused__,__weakref__("rb_define_module_function"),__nonnull__ (2,3)))static void rb_define_module_functionm3(VALUE klass, const char *name,VALUE(*func)(),int arity); __attribute__((__unused__,__weakref__("rb_define_module_function"),__nonnull__ (2,3)))static void rb_define_module_functionm2(VALUE klass, const char *name,VALUE(*func)(VALUE,VALUE),int arity); __attribute__((__unused__,__weakref__("rb_define_module_function"),__nonnull__ (2,3)))static void rb_define_module_functionm1(VALUE klass, const char *name,VALUE(*func)(int,union{VALUE*x;const VALUE*y;}__attribute__((__transparent_union__)),VALUE),int arity);
5159 __attribute__((__unused__,__weakref__("rb_define_global_function"),__nonnull__ (1,2)))static void rb_define_global_function0(const char *name,VALUE(*func)(VALUE),int arity); __attribute__((__unused__,__weakref__("rb_define_global_function"),__nonnull__ (1,2)))static void rb_define_global_function1(const char *name,VALUE(*func)(VALUE,VALUE),int arity); __attribute__((__unused__,__weakref__("rb_define_global_function"),__nonnull__ (1,2)))static void rb_define_global_function2(const char *name,VALUE(*func)(VALUE,VALUE,VALUE),int arity); __attribute__((__unused__,__weakref__("rb_define_global_function"),__nonnull__ (1,2)))static void rb_define_global_function3(const char *name,VALUE(*func)(VALUE,VALUE,VALUE,VALUE),int arity); __attribute__((__unused__,__weakref__("rb_define_global_function"),__nonnull__ (1,2)))static void rb_define_global_function4(const char *name,VALUE(*func)(VALUE,VALUE,VALUE,VALUE,VALUE),int arity); __attribute__((__unused__,__weakref__("rb_define_global_function"),__nonnull__ (1,2)))static void rb_define_global_function5(const char *name,VALUE(*func)(VALUE,VALUE,VALUE,VALUE,VALUE,VALUE),int arity); __attribute__((__unused__,__weakref__("rb_define_global_function"),__nonnull__ (1,2)))static void rb_define_global_function6(const char *name,VALUE(*func)(VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE),int arity); __attribute__((__unused__,__weakref__("rb_define_global_function"),__nonnull__ (1,2)))static void rb_define_global_function7(const char *name,VALUE(*func)(VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE),int arity); __attribute__((__unused__,__weakref__("rb_define_global_function"),__nonnull__ (1,2)))static void rb_define_global_function8(const char *name,VALUE(*func)(VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE),int arity); __attribute__((__unused__,__weakref__("rb_define_global_function"),__nonnull__ (1,2)))static void rb_define_global_function9(const char *name,VALUE(*func)(VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE),int arity); __attribute__((__unused__,__weakref__("rb_define_global_function"),__nonnull__ (1,2)))static void rb_define_global_function10(const char *name,VALUE(*func)(VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE),int arity); __attribute__((__unused__,__weakref__("rb_define_global_function"),__nonnull__ (1,2)))static void rb_define_global_function11(const char *name,VALUE(*func)(VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE),int arity); __attribute__((__unused__,__weakref__("rb_define_global_function"),__nonnull__ (1,2)))static void rb_define_global_function12(const char *name,VALUE(*func)(VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE),int arity); __attribute__((__unused__,__weakref__("rb_define_global_function"),__nonnull__ (1,2)))static void rb_define_global_function13(const char *name,VALUE(*func)(VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE),int arity); __attribute__((__unused__,__weakref__("rb_define_global_function"),__nonnull__ (1,2)))static void rb_define_global_function14(const char *name,VALUE(*func)(VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE),int arity); __attribute__((__unused__,__weakref__("rb_define_global_function"),__nonnull__ (1,2)))static void rb_define_global_function15(const char *name,VALUE(*func)(VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE),int arity); __attribute__((__unused__,__weakref__("rb_define_global_function"),__nonnull__ (1,2)))static void rb_define_global_functionm3(const char *name,VALUE(*func)(),int arity); __attribute__((__unused__,__weakref__("rb_define_global_function"),__nonnull__ (1,2)))static void rb_define_global_functionm2(const char *name,VALUE(*func)(VALUE,VALUE),int arity); __attribute__((__unused__,__weakref__("rb_define_global_function"),__nonnull__ (1,2)))static void rb_define_global_functionm1(const char *name,VALUE(*func)(int,union{VALUE*x;const VALUE*y;}__attribute__((__transparent_union__)),VALUE),int arity);
5160typedef
5161 struct {
5162 unsigned long int nraddr;
5163 }
5164 OrigFn;
5165typedef
5166 enum { VG_USERREQ__RUNNING_ON_VALGRIND = 0x1001,
5167 VG_USERREQ__DISCARD_TRANSLATIONS = 0x1002,
5168 VG_USERREQ__CLIENT_CALL0 = 0x1101,
5169 VG_USERREQ__CLIENT_CALL1 = 0x1102,
5170 VG_USERREQ__CLIENT_CALL2 = 0x1103,
5171 VG_USERREQ__CLIENT_CALL3 = 0x1104,
5172 VG_USERREQ__COUNT_ERRORS = 0x1201,
5173 VG_USERREQ__GDB_MONITOR_COMMAND = 0x1202,
5174 VG_USERREQ__MALLOCLIKE_BLOCK = 0x1301,
5175 VG_USERREQ__RESIZEINPLACE_BLOCK = 0x130b,
5176 VG_USERREQ__FREELIKE_BLOCK = 0x1302,
5177 VG_USERREQ__CREATE_MEMPOOL = 0x1303,
5178 VG_USERREQ__DESTROY_MEMPOOL = 0x1304,
5179 VG_USERREQ__MEMPOOL_ALLOC = 0x1305,
5180 VG_USERREQ__MEMPOOL_FREE = 0x1306,
5181 VG_USERREQ__MEMPOOL_TRIM = 0x1307,
5182 VG_USERREQ__MOVE_MEMPOOL = 0x1308,
5183 VG_USERREQ__MEMPOOL_CHANGE = 0x1309,
5184 VG_USERREQ__MEMPOOL_EXISTS = 0x130a,
5185 VG_USERREQ__PRINTF = 0x1401,
5186 VG_USERREQ__PRINTF_BACKTRACE = 0x1402,
5187 VG_USERREQ__PRINTF_VALIST_BY_REF = 0x1403,
5188 VG_USERREQ__PRINTF_BACKTRACE_VALIST_BY_REF = 0x1404,
5189 VG_USERREQ__STACK_REGISTER = 0x1501,
5190 VG_USERREQ__STACK_DEREGISTER = 0x1502,
5191 VG_USERREQ__STACK_CHANGE = 0x1503,
5192 VG_USERREQ__LOAD_PDB_DEBUGINFO = 0x1601,
5193 VG_USERREQ__MAP_IP_TO_SRCLOC = 0x1701,
5194 VG_USERREQ__CHANGE_ERR_DISABLEMENT = 0x1801,
5195 VG_USERREQ__VEX_INIT_FOR_IRI = 0x1901,
5196 VG_USERREQ__INNER_THREADS = 0x1902
5197 } Vg_ClientRequest;
5198static int VALGRIND_PRINTF(const char *format, ...)
5199 __attribute__((format(__printf__, 1, 2), __unused__));
5200static int
5201VALGRIND_PRINTF(const char *format, ...)
5202{
5203 unsigned long _qzz_res;
5204 va_list vargs;
5205 __builtin_va_start(vargs,format);
5206 _qzz_res = __extension__ ({ volatile unsigned long int _zzq_args[6]; volatile unsigned long int _zzq_result; _zzq_args[0] = (unsigned long int)(VG_USERREQ__PRINTF_VALIST_BY_REF); _zzq_args[1] = (unsigned long int)((unsigned long)format); _zzq_args[2] = (unsigned long int)((unsigned long)&vargs); _zzq_args[3] = (unsigned long int)(0); _zzq_args[4] = (unsigned long int)(0); _zzq_args[5] = (unsigned long int)(0); __asm__ volatile("rolq $3, %%rdi ; rolq $13, %%rdi\n\t" "rolq $61, %%rdi ; rolq $51, %%rdi\n\t" "xchgq %%rbx,%%rbx" : "=d" (_zzq_result) : "a" (&_zzq_args[0]), "0" (0) : "cc", "memory" ); _zzq_result; });
5207 __builtin_va_end(vargs);
5208 return (int)_qzz_res;
5209}
5210static int VALGRIND_PRINTF_BACKTRACE(const char *format, ...)
5211 __attribute__((format(__printf__, 1, 2), __unused__));
5212static int
5213VALGRIND_PRINTF_BACKTRACE(const char *format, ...)
5214{
5215 unsigned long _qzz_res;
5216 va_list vargs;
5217 __builtin_va_start(vargs,format);
5218 _qzz_res = __extension__ ({ volatile unsigned long int _zzq_args[6]; volatile unsigned long int _zzq_result; _zzq_args[0] = (unsigned long int)(VG_USERREQ__PRINTF_BACKTRACE_VALIST_BY_REF); _zzq_args[1] = (unsigned long int)((unsigned long)format); _zzq_args[2] = (unsigned long int)((unsigned long)&vargs); _zzq_args[3] = (unsigned long int)(0); _zzq_args[4] = (unsigned long int)(0); _zzq_args[5] = (unsigned long int)(0); __asm__ volatile("rolq $3, %%rdi ; rolq $13, %%rdi\n\t" "rolq $61, %%rdi ; rolq $51, %%rdi\n\t" "xchgq %%rbx,%%rbx" : "=d" (_zzq_result) : "a" (&_zzq_args[0]), "0" (0) : "cc", "memory" ); _zzq_result; });
5219 __builtin_va_end(vargs);
5220 return (int)_qzz_res;
5221}
5222typedef
5223 enum {
5224 VG_USERREQ__MAKE_MEM_NOACCESS = ((unsigned int)((('M')&0xff) << 24 | (('C')&0xff) << 16)),
5225 VG_USERREQ__MAKE_MEM_UNDEFINED,
5226 VG_USERREQ__MAKE_MEM_DEFINED,
5227 VG_USERREQ__DISCARD,
5228 VG_USERREQ__CHECK_MEM_IS_ADDRESSABLE,
5229 VG_USERREQ__CHECK_MEM_IS_DEFINED,
5230 VG_USERREQ__DO_LEAK_CHECK,
5231 VG_USERREQ__COUNT_LEAKS,
5232 VG_USERREQ__GET_VBITS,
5233 VG_USERREQ__SET_VBITS,
5234 VG_USERREQ__CREATE_BLOCK,
5235 VG_USERREQ__MAKE_MEM_DEFINED_IF_ADDRESSABLE,
5236 VG_USERREQ__COUNT_LEAK_BLOCKS,
5237 VG_USERREQ__ENABLE_ADDR_ERROR_REPORTING_IN_RANGE,
5238 VG_USERREQ__DISABLE_ADDR_ERROR_REPORTING_IN_RANGE,
5239 _VG_USERREQ__MEMCHECK_RECORD_OVERLAP_ERROR
5240 = ((unsigned int)((('M')&0xff) << 24 | (('C')&0xff) << 16)) + 256
5241 } Vg_MemCheckClientRequest;
5242static inline unsigned int
5243nlz_int(unsigned int x)
5244{
5245 if (x == 0) return 4 * 8;
5246 return (unsigned int)__builtin_clz(x);
5247}
5248static inline unsigned int
5249nlz_long(unsigned long x)
5250{
5251 if (x == 0) return 8 * 8;
5252 return (unsigned int)__builtin_clzl(x);
5253}
5254static inline unsigned int
5255nlz_long_long(unsigned long long x)
5256{
5257 if (x == 0) return 8 * 8;
5258 return (unsigned int)__builtin_clzll(x);
5259}
5260static inline unsigned int
5261nlz_int128(unsigned __int128 x)
5262{
5263 unsigned __int128 y;
5264 unsigned int n = 128;
5265 y = x >> 64; if (y) {n -= 64; x = y;}
5266 y = x >> 32; if (y) {n -= 32; x = y;}
5267 y = x >> 16; if (y) {n -= 16; x = y;}
5268 y = x >> 8; if (y) {n -= 8; x = y;}
5269 y = x >> 4; if (y) {n -= 4; x = y;}
5270 y = x >> 2; if (y) {n -= 2; x = y;}
5271 y = x >> 1; if (y) {return n - 2;}
5272 return (unsigned int)(n - x);
5273}
5274static inline unsigned int
5275nlz_intptr(uintptr_t x)
5276{
5277 return nlz_long(x);
5278}
5279static inline unsigned int
5280rb_popcount32(uint32_t x)
5281{
5282 return (unsigned int)__builtin_popcount(x);
5283}
5284static inline int
5285rb_popcount64(uint64_t x)
5286{
5287 return __builtin_popcountll(x);
5288}
5289static inline int
5290rb_popcount_intptr(uintptr_t x)
5291{
5292 return rb_popcount64(x);
5293}
5294static inline int
5295ntz_int32(uint32_t x)
5296{
5297 return __builtin_ctz(x);
5298}
5299static inline int
5300ntz_int64(uint64_t x)
5301{
5302 return __builtin_ctzll(x);
5303}
5304static inline int
5305ntz_intptr(uintptr_t x)
5306{
5307 return ntz_int64(x);
5308}
5309VALUE rb_int128t2big(__int128 n);
5310static inline long
5311rb_overflowed_fix_to_int(long x)
5312{
5313 return (long)((unsigned long)(x >> 1) ^ (1LU << (8 * 8 - 1)));
5314}
5315static inline VALUE
5316rb_fix_plus_fix(VALUE x, VALUE y)
5317{
5318 long lz;
5319 if (__builtin_add_overflow((long)x, (long)y-1, &lz)) {
5320 return rb_int2big(rb_overflowed_fix_to_int(lz));
5321 }
5322 else {
5323 return (VALUE)lz;
5324 }
5325}
5326static inline VALUE
5327rb_fix_minus_fix(VALUE x, VALUE y)
5328{
5329 long lz;
5330 if (__builtin_sub_overflow((long)x, (long)y-1, &lz)) {
5331 return rb_int2big(rb_overflowed_fix_to_int(lz));
5332 }
5333 else {
5334 return (VALUE)lz;
5335 }
5336}
5337static inline VALUE
5338rb_fix_mul_fix(VALUE x, VALUE y)
5339{
5340 long lx = ((long)(((long)(x))>>(int)(1)));
5341 long ly = ((long)(((long)(y))>>(int)(1)));
5342 return (((((__int128)lx * (__int128)ly) < (0x7fffffffffffffffL>>1)+1) && (((__int128)lx * (__int128)ly) >= (((long)(-0x7fffffffffffffffL - 1L))>>(int)(1)))) ? (((VALUE)((__int128)lx * (__int128)ly))<<1 | RUBY_FIXNUM_FLAG) : rb_int128t2big((__int128)lx * (__int128)ly));
5343}
5344static inline void
5345rb_fix_divmod_fix(VALUE a, VALUE b, VALUE *divp, VALUE *modp)
5346{
5347 long x = ((long)(((long)(a))>>(int)(1)));
5348 long y = ((long)(((long)(b))>>(int)(1)));
5349 long div, mod;
5350 if (x == (((long)(-0x7fffffffffffffffL - 1L))>>(int)(1)) && y == -1) {
5351 if (divp) *divp = rb_long2num_inline(-(((long)(-0x7fffffffffffffffL - 1L))>>(int)(1)));
5352 if (modp) *modp = (((VALUE)(0))<<1 | RUBY_FIXNUM_FLAG);
5353 return;
5354 }
5355 div = x / y;
5356 mod = x % y;
5357 if (y > 0 ? mod < 0 : mod > 0) {
5358 mod += y;
5359 div -= 1;
5360 }
5361 if (divp) *divp = (((VALUE)(div))<<1 | RUBY_FIXNUM_FLAG);
5362 if (modp) *modp = (((VALUE)(mod))<<1 | RUBY_FIXNUM_FLAG);
5363}
5364static inline VALUE
5365rb_fix_div_fix(VALUE x, VALUE y)
5366{
5367 VALUE div;
5368 rb_fix_divmod_fix(x, y, &div, ((void *)0));
5369 return div;
5370}
5371static inline VALUE
5372rb_fix_mod_fix(VALUE x, VALUE y)
5373{
5374 VALUE mod;
5375 rb_fix_divmod_fix(x, y, ((void *)0), &mod);
5376 return mod;
5377}
5378struct RBignum {
5379 struct RBasic basic;
5380 union {
5381 struct {
5382 size_t len;
5383 unsigned int *digits;
5384 } heap;
5385 unsigned int ary[(8*RVALUE_EMBED_LEN_MAX/4)];
5386 } as;
5387};
5388struct RRational {
5389 struct RBasic basic;
5390 VALUE num;
5391 VALUE den;
5392};
5393struct RFloat {
5394 struct RBasic basic;
5395 double float_value;
5396};
5397struct RComplex {
5398 struct RBasic basic;
5399 VALUE real;
5400 VALUE imag;
5401};
5402enum ruby_rhash_flags {
5403 RHASH_PASS_AS_KEYWORDS = ((VALUE)RUBY_FL_USER1),
5404 RHASH_PROC_DEFAULT = ((VALUE)RUBY_FL_USER2),
5405 RHASH_ST_TABLE_FLAG = ((VALUE)RUBY_FL_USER3),
5406 RHASH_AR_TABLE_SIZE_MASK = (((VALUE)RUBY_FL_USER4)|((VALUE)RUBY_FL_USER5)|((VALUE)RUBY_FL_USER6)|((VALUE)RUBY_FL_USER7)),
5407 RHASH_AR_TABLE_SIZE_SHIFT = (((VALUE)RUBY_FL_USHIFT)+4),
5408 RHASH_AR_TABLE_BOUND_MASK = (((VALUE)RUBY_FL_USER8)|((VALUE)RUBY_FL_USER9)|((VALUE)RUBY_FL_USER10)|((VALUE)RUBY_FL_USER11)),
5409 RHASH_AR_TABLE_BOUND_SHIFT = (((VALUE)RUBY_FL_USHIFT)+8),
5410 RHASH_TRANSIENT_FLAG = ((VALUE)RUBY_FL_USER12),
5411 RHASH_LEV_SHIFT = (((VALUE)RUBY_FL_USHIFT) + 13),
5412 RHASH_LEV_MAX = 127,
5413 RHASH_ENUM_END
5414};
5415void rb_hash_st_table_set(VALUE hash, st_table *st);
5416typedef unsigned char ar_hint_t;
5417struct RHash {
5418 struct RBasic basic;
5419 union {
5420 st_table *st;
5421 struct ar_table_struct *ar;
5422 } as;
5423 const VALUE ifnone;
5424 union {
5425 ar_hint_t ary[8];
5426 VALUE word;
5427 } ar_hint;
5428};
5429struct RMoved {
5430 VALUE flags;
5431 VALUE destination;
5432 VALUE next;
5433};
5434extern void ruby_init_setproctitle(int argc, char *argv[]);
5435enum {
5436 RSTRUCT_EMBED_LEN_MAX = RVALUE_EMBED_LEN_MAX,
5437 RSTRUCT_EMBED_LEN_MASK = (RUBY_FL_USER2|RUBY_FL_USER1),
5438 RSTRUCT_EMBED_LEN_SHIFT = (RUBY_FL_USHIFT+1),
5439 RSTRUCT_TRANSIENT_FLAG = ((VALUE)RUBY_FL_USER3),
5440 RSTRUCT_ENUM_END
5441};
5442struct RStruct {
5443 struct RBasic basic;
5444 union {
5445 struct {
5446 long len;
5447 const VALUE *ptr;
5448 } heap;
5449 const VALUE ary[RSTRUCT_EMBED_LEN_MAX];
5450 } as;
5451};
5452static inline long
5453rb_struct_len(VALUE st)
5454{
5455 return (((struct RBasic*)(st))->flags & RSTRUCT_EMBED_LEN_MASK) ?
5456 (long)((((struct RBasic*)(st))->flags >> RSTRUCT_EMBED_LEN_SHIFT) & (RSTRUCT_EMBED_LEN_MASK >> RSTRUCT_EMBED_LEN_SHIFT)) : ((struct RStruct*)(st))->as.heap.len;
5457}
5458static inline const VALUE *
5459rb_struct_const_ptr(VALUE st)
5460{
5461 return ((((struct RBasic*)(st))->flags & RSTRUCT_EMBED_LEN_MASK) ? ((struct RStruct*)(st))->as.ary : ((struct RStruct*)(st))->as.heap.ptr);
5462}
5463static inline const VALUE *
5464rb_struct_const_heap_ptr(VALUE st)
5465{
5466 return ((struct RStruct*)(st))->as.heap.ptr;
5467}
5469 char conflict[sizeof(VALUE) * 3];
5470};
5471struct rb_subclass_entry;
5473struct rb_subclass_entry {
5474 VALUE klass;
5475 rb_subclass_entry_t *next;
5476};
5477typedef unsigned long long rb_serial_t;
5478struct rb_classext_struct {
5479 struct st_table *iv_index_tbl;
5480 struct st_table *iv_tbl;
5481 struct rb_id_table *m_tbl;
5482 struct rb_id_table *const_tbl;
5483 struct rb_id_table *callable_m_tbl;
5484 rb_subclass_entry_t *subclasses;
5485 rb_subclass_entry_t **parent_subclasses;
5486 rb_subclass_entry_t **module_subclasses;
5487 const VALUE origin_;
5488 const VALUE refined_class;
5489 rb_alloc_func_t allocator;
5490 const VALUE includer;
5491};
5492typedef struct rb_classext_struct rb_classext_t;
5493struct RClass {
5494 struct RBasic basic;
5495 VALUE super;
5496 rb_classext_t *ptr;
5497 rb_serial_t class_serial;
5498};
5499void rb_class_subclass_add(VALUE super, VALUE klass);
5500void rb_class_remove_from_super_subclasses(VALUE);
5501int rb_singleton_class_internal_p(VALUE sklass);
5502static inline void
5503RCLASS_SET_ORIGIN(VALUE klass, VALUE origin)
5504{
5505 rb_obj_write((VALUE)(klass), (VALUE *)(&((((struct RClass*)(klass))->ptr)->origin_)), (VALUE)(origin), "./internal.h", 1091);
5506 if (klass != origin) ((!(((VALUE)(origin) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(origin) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(origin))->flags & RUBY_T_MASK) != RUBY_T_NODE) ? (void)(((struct RBasic*)(origin))->flags |= (((VALUE)RUBY_FL_USER5))) : (void)0);
5507}
5508static inline void
5509RCLASS_SET_INCLUDER(VALUE iclass, VALUE klass)
5510{
5511 rb_obj_write((VALUE)(iclass), (VALUE *)(&((((struct RClass*)(iclass))->ptr)->includer)), (VALUE)(klass), "./internal.h", 1098);
5512}
5513static inline VALUE
5514RCLASS_SUPER(VALUE klass)
5515{
5516 return ((struct RClass*)(klass))->super;
5517}
5518static inline VALUE
5519RCLASS_SET_SUPER(VALUE klass, VALUE super)
5520{
5521 if (super) {
5522 rb_class_remove_from_super_subclasses(klass);
5523 rb_class_subclass_add(super, klass);
5524 }
5525 rb_obj_write((VALUE)(klass), (VALUE *)(&((struct RClass*)(klass))->super), (VALUE)(super), "./internal.h", 1115);
5526 return super;
5527}
5528struct RIMemo {
5529 VALUE flags;
5530 VALUE v0;
5531 VALUE v1;
5532 VALUE v2;
5533 VALUE v3;
5534};
5535enum imemo_type {
5536 imemo_env = 0,
5537 imemo_cref = 1,
5538 imemo_svar = 2,
5539 imemo_throw_data = 3,
5540 imemo_ifunc = 4,
5541 imemo_memo = 5,
5542 imemo_ment = 6,
5543 imemo_iseq = 7,
5544 imemo_tmpbuf = 8,
5545 imemo_ast = 9,
5546 imemo_parser_strterm = 10
5547};
5548static inline enum imemo_type
5549imemo_type(VALUE imemo)
5550{
5551 return (((struct RBasic*)(imemo))->flags >> ((VALUE)RUBY_FL_USHIFT)) & 0x0f;
5552}
5553static inline int
5554imemo_type_p(VALUE imemo, enum imemo_type imemo_type)
5555{
5556 if ((__builtin_expect(!!(!(((VALUE)(imemo) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(imemo) & (VALUE)~((VALUE)RUBY_Qnil)) == 0))), 1))) {
5557 const VALUE mask = (0x0f << ((VALUE)RUBY_FL_USHIFT)) | RUBY_T_MASK;
5558 const VALUE expected_type = (imemo_type << ((VALUE)RUBY_FL_USHIFT)) | RUBY_T_IMEMO;
5559 return expected_type == (((struct RBasic*)(imemo))->flags & mask);
5560 }
5561 else {
5562 return 0;
5563 }
5564}
5565VALUE rb_imemo_new(enum imemo_type type, VALUE v1, VALUE v2, VALUE v3, VALUE v0);
5566struct vm_svar {
5567 VALUE flags;
5568 const VALUE cref_or_me;
5569 const VALUE lastline;
5570 const VALUE backref;
5571 const VALUE others;
5572};
5573struct vm_throw_data {
5574 VALUE flags;
5575 VALUE reserved;
5576 const VALUE throw_obj;
5577 const struct rb_control_frame_struct *catch_frame;
5578 int throw_state;
5579};
5580struct vm_ifunc_argc {
5581 int min, max;
5582};
5583struct vm_ifunc {
5584 VALUE flags;
5585 VALUE reserved;
5586 rb_block_call_func_t func;
5587 const void *data;
5588 struct vm_ifunc_argc argc;
5589};
5590struct vm_ifunc *rb_vm_ifunc_new(rb_block_call_func_t func, const void *data, int min_argc, int max_argc);
5591static inline struct vm_ifunc *
5592rb_vm_ifunc_proc_new(rb_block_call_func_t func, const void *data)
5593{
5594 return rb_vm_ifunc_new(func, data, 0, (-1));
5595}
5596typedef struct rb_imemo_tmpbuf_struct {
5597 VALUE flags;
5598 VALUE reserved;
5599 VALUE *ptr;
5600 struct rb_imemo_tmpbuf_struct *next;
5601 size_t cnt;
5603rb_imemo_tmpbuf_t *rb_imemo_tmpbuf_parser_heap(void *buf, rb_imemo_tmpbuf_t *old_heap, size_t cnt);
5604static inline void *
5605rb_imemo_tmpbuf_set_ptr(VALUE v, void *ptr)
5606{
5607 return ((rb_imemo_tmpbuf_t *)v)->ptr = ptr;
5608}
5609static inline VALUE
5610rb_imemo_tmpbuf_auto_free_pointer_new_from_an_RString(VALUE str)
5611{
5612 const void *src;
5613 VALUE imemo;
5614 rb_imemo_tmpbuf_t *tmpbuf;
5615 void *dst;
5616 size_t len;
5617 rb_string_value(&(str));
5618 imemo = rb_imemo_new(imemo_tmpbuf, 0, 0, 0, 0);
5619 tmpbuf = (rb_imemo_tmpbuf_t *)imemo;
5620 len = (!(((struct RBasic*)(str))->flags & RSTRING_NOEMBED) ? (long)((((struct RBasic*)(str))->flags >> RSTRING_EMBED_LEN_SHIFT) & (RSTRING_EMBED_LEN_MASK >> RSTRING_EMBED_LEN_SHIFT)) : ((struct RString*)(str))->as.heap.len);
5621 src = (!(((struct RBasic*)(str))->flags & RSTRING_NOEMBED) ? ((struct RString*)(str))->as.ary : ((struct RString*)(str))->as.heap.ptr);
5622 dst = ruby_xmalloc(len);
5623 ruby_nonempty_memcpy(dst, src, len);
5624 tmpbuf->ptr = dst;
5625 return imemo;
5626}
5627void rb_strterm_mark(VALUE obj);
5628struct MEMO {
5629 VALUE flags;
5630 VALUE reserved;
5631 const VALUE v1;
5632 const VALUE v2;
5633 union {
5634 long cnt;
5635 long state;
5636 const VALUE value;
5637 void (*func)(void);
5638 } u3;
5639};
5640enum {
5641 cmp_opt_Fixnum,
5642 cmp_opt_String,
5643 cmp_opt_Float,
5644 cmp_optimizable_count
5645};
5646struct cmp_opt_data {
5647 unsigned int opt_methods;
5648 unsigned int opt_inited;
5649};
5650struct rb_global_entry {
5651 struct rb_global_variable *var;
5652 ID id;
5653};
5655VALUE rb_gvar_get(struct rb_global_entry *);
5656VALUE rb_gvar_set(struct rb_global_entry *, VALUE);
5657VALUE rb_gvar_defined(struct rb_global_entry *);
5658VALUE rb_ary_last(int, const VALUE *, VALUE);
5659void rb_ary_set_len(VALUE, long);
5660void rb_ary_delete_same(VALUE, VALUE);
5661VALUE rb_ary_tmp_new_fill(long capa);
5662VALUE rb_ary_at(VALUE, VALUE);
5663VALUE rb_ary_aref1(VALUE ary, VALUE i);
5664size_t rb_ary_memsize(VALUE);
5665VALUE rb_to_array_type(VALUE obj);
5666VALUE rb_check_to_array(VALUE ary);
5667VALUE rb_ary_tmp_new_from_values(VALUE, long, const VALUE *);
5668VALUE rb_ary_behead(VALUE, long);
5669static inline VALUE
5670rb_ary_entry_internal(VALUE ary, long offset)
5671{
5672 long len = rb_array_len(ary);
5673 const VALUE *ptr = rb_array_const_ptr_transient(ary);
5674 if (len == 0) return ((VALUE)RUBY_Qnil);
5675 if (offset < 0) {
5676 offset += len;
5677 if (offset < 0) return ((VALUE)RUBY_Qnil);
5678 }
5679 else if (len <= offset) {
5680 return ((VALUE)RUBY_Qnil);
5681 }
5682 return ptr[offset];
5683}
5684void rb_obj_info_dump(VALUE obj);
5685void rb_obj_info_dump_loc(VALUE obj, const char *file, int line, const char *func);
5686void ruby_debug_breakpoint(void);
5687extern const char ruby_digitmap[];
5688double rb_big_fdiv_double(VALUE x, VALUE y);
5689VALUE rb_big_uminus(VALUE x);
5690VALUE rb_big_hash(VALUE);
5691VALUE rb_big_odd_p(VALUE);
5692VALUE rb_big_even_p(VALUE);
5693size_t rb_big_size(VALUE);
5694VALUE rb_integer_float_cmp(VALUE x, VALUE y);
5695VALUE rb_integer_float_eq(VALUE x, VALUE y);
5696VALUE rb_str_convert_to_inum(VALUE str, int base, int badcheck, int raise_exception);
5697VALUE rb_big_comp(VALUE x);
5698VALUE rb_big_aref(VALUE x, VALUE y);
5699VALUE rb_big_abs(VALUE x);
5700VALUE rb_big_size_m(VALUE big);
5701VALUE rb_big_bit_length(VALUE big);
5702VALUE rb_big_remainder(VALUE x, VALUE y);
5703VALUE rb_big_gt(VALUE x, VALUE y);
5704VALUE rb_big_ge(VALUE x, VALUE y);
5705VALUE rb_big_lt(VALUE x, VALUE y);
5706VALUE rb_big_le(VALUE x, VALUE y);
5707VALUE rb_int_powm(int const argc, VALUE * const argv, VALUE const num);
5708VALUE rb_class_boot(VALUE);
5709VALUE rb_class_inherited(VALUE, VALUE);
5710VALUE rb_make_metaclass(VALUE, VALUE);
5711VALUE rb_include_class_new(VALUE, VALUE);
5712void rb_class_foreach_subclass(VALUE klass, void (*f)(VALUE, VALUE), VALUE);
5713void rb_class_detach_subclasses(VALUE);
5714void rb_class_detach_module_subclasses(VALUE);
5715void rb_class_remove_from_module_subclasses(VALUE);
5716VALUE rb_obj_methods(int argc, const VALUE *argv, VALUE obj);
5717VALUE rb_obj_protected_methods(int argc, const VALUE *argv, VALUE obj);
5718VALUE rb_obj_private_methods(int argc, const VALUE *argv, VALUE obj);
5719VALUE rb_obj_public_methods(int argc, const VALUE *argv, VALUE obj);
5720VALUE rb_special_singleton_class(VALUE);
5721VALUE rb_singleton_class_clone_and_attach(VALUE obj, VALUE attach);
5722VALUE rb_singleton_class_get(VALUE obj);
5723void Init_class_hierarchy(void);
5724int rb_class_has_methods(VALUE c);
5725void rb_undef_methods_from(VALUE klass, VALUE super);
5726VALUE rb_invcmp(VALUE, VALUE);
5727struct rb_block;
5728struct rb_iseq_struct;
5729int rb_dvar_defined(ID, const struct rb_iseq_struct *);
5730int rb_local_defined(ID, const struct rb_iseq_struct *);
5731const char * rb_insns_name(int i);
5732VALUE rb_insns_name_array(void);
5733int rb_vm_insn_addr2insn(const void *);
5734VALUE rb_dbl_complex_new_polar_pi(double abs, double ang);
5735struct rb_thread_struct;
5736VALUE rb_obj_is_fiber(VALUE);
5737void rb_fiber_reset_root_local_storage(struct rb_thread_struct *);
5738void ruby_register_rollback_func_for_ensure(VALUE (*ensure_func)(VALUE), VALUE (*rollback_func)(VALUE));
5739void ruby_debug_printf(const char*, ...) __attribute__((format(printf, 1, 2)));
5740VALUE rb_dir_getwd_ospath(void);
5741void Init_enc(void);
5742void Init_ext(void);
5743ID rb_id_encoding(void);
5744int rb_encdb_replicate(const char *alias, const char *orig);
5745int rb_encdb_alias(const char *alias, const char *orig);
5746int rb_encdb_dummy(const char *name);
5747void rb_encdb_declare(const char *name);
5748void rb_enc_set_base(const char *name, const char *orig);
5749int rb_enc_set_dummy(int index);
5750void rb_encdb_set_unicode(int index);
5751__attribute__ ((__pure__)) int rb_data_is_encoding(VALUE obj);
5752extern VALUE rb_cArithSeq;
5753VALUE rb_f_send(int argc, VALUE *argv, VALUE recv);
5754VALUE rb_nmin_run(VALUE obj, VALUE num, int by, int rev, int ary);
5755extern VALUE rb_eEAGAIN;
5756extern VALUE rb_eEWOULDBLOCK;
5757extern VALUE rb_eEINPROGRESS;
5758void rb_report_bug_valist(VALUE file, int line, const char *fmt, va_list args);
5759__attribute__ ((__noreturn__)) void rb_async_bug_errno(const char *,int);
5760const char *rb_builtin_type_name(int t);
5761const char *rb_builtin_class_name(VALUE x);
5762void rb_warn_deprecated(const char *fmt, const char *suggest, ...) __attribute__((format(printf, 1, 3)));
5763typedef enum {
5768rb_warning_category_t rb_warning_category_from_name(VALUE category);
5769_Bool rb_warning_category_enabled_p(rb_warning_category_t category);
5770VALUE rb_name_err_new(VALUE mesg, VALUE recv, VALUE method);
5771VALUE rb_nomethod_err_new(VALUE mesg, VALUE recv, VALUE method, VALUE args, int priv);
5772VALUE rb_key_err_new(VALUE mesg, VALUE recv, VALUE name);
5773VALUE rb_warning_string(const char *fmt, ...) __attribute__((format(printf, 1, 2)));
5774__attribute__ ((__noreturn__)) void rb_vraise(VALUE, const char *, va_list);
5775VALUE rb_refinement_module_get_refined_class(VALUE module);
5776extern ID ruby_static_id_signo, ruby_static_id_status;
5777void rb_class_modify_check(VALUE);
5778__attribute__ ((__noreturn__)) VALUE rb_f_raise(int argc, VALUE *argv);
5779VALUE rb_get_backtrace(VALUE info);
5780void rb_call_end_proc(VALUE data);
5781void rb_mark_end_proc(void);
5782extern const char ruby_null_device[];
5783VALUE rb_home_dir_of(VALUE user, VALUE result);
5784VALUE rb_default_home_dir(VALUE result);
5785VALUE rb_realpath_internal(VALUE basedir, VALUE path, int strict);
5786void rb_file_const(const char*, VALUE);
5787int rb_file_load_ok(const char *);
5788VALUE rb_file_expand_path_fast(VALUE, VALUE);
5789VALUE rb_file_expand_path_internal(VALUE, VALUE, int, int, VALUE);
5790VALUE rb_get_path_check_to_string(VALUE);
5791VALUE rb_get_path_check_convert(VALUE);
5792void Init_File(void);
5793int ruby_is_fd_loadable(int fd);
5794__attribute__ ((__noreturn__)) void rb_sys_fail_path_in(const char *func_name, VALUE path);
5795__attribute__ ((__noreturn__)) void rb_syserr_fail_path_in(const char *func_name, int err, VALUE path);
5796extern VALUE *ruby_initial_gc_stress_ptr;
5797extern int ruby_disable_gc;
5798void Init_heap(void);
5799void *ruby_mimmalloc(size_t size) __attribute__((__malloc__));
5800void ruby_mimfree(void *ptr);
5801void rb_objspace_set_event_hook(const rb_event_flag_t event);
5802void rb_gc_writebarrier_remember(VALUE obj);
5803void ruby_gc_set_params(void);
5804void rb_copy_wb_protected_attribute(VALUE dest, VALUE obj);
5805__attribute__((__alloc_align__(1)))
5806void *rb_aligned_malloc(size_t, size_t) __attribute__((__malloc__)) __attribute__ ((alloc_size (2)));
5807size_t rb_size_mul_or_raise(size_t, size_t, VALUE);
5808size_t rb_size_mul_add_or_raise(size_t, size_t, size_t, VALUE);
5809void *rb_xmalloc_mul_add(size_t, size_t, size_t) __attribute__((__malloc__));
5810void *rb_xrealloc_mul_add(const void *, size_t, size_t, size_t);
5811void *rb_xmalloc_mul_add_mul(size_t, size_t, size_t, size_t) __attribute__((__malloc__));
5812void *rb_xcalloc_mul_add_mul(size_t, size_t, size_t, size_t) __attribute__((__malloc__));
5813struct st_table *rb_hash_tbl_raw(VALUE hash);
5814VALUE rb_hash_new_with_size(st_index_t size);
5815VALUE rb_hash_has_key(VALUE hash, VALUE key);
5816VALUE rb_hash_default_value(VALUE hash, VALUE key);
5817VALUE rb_hash_set_default_proc(VALUE hash, VALUE proc);
5818long rb_dbl_long_hash(double d);
5819st_table *rb_init_identtable(void);
5820VALUE rb_hash_compare_by_id_p(VALUE hash);
5821VALUE rb_to_hash_type(VALUE obj);
5822VALUE rb_hash_key_str(VALUE);
5823VALUE rb_hash_keys(VALUE hash);
5824VALUE rb_hash_values(VALUE hash);
5825VALUE rb_hash_rehash(VALUE hash);
5826VALUE rb_hash_resurrect(VALUE hash);
5827int rb_hash_add_new_element(VALUE hash, VALUE key, VALUE val);
5828VALUE rb_hash_set_pair(VALUE hash, VALUE pair);
5829int rb_hash_stlike_lookup(VALUE hash, st_data_t key, st_data_t *pval);
5830int rb_hash_stlike_delete(VALUE hash, st_data_t *pkey, st_data_t *pval);
5831
5832
5833int rb_hash_stlike_foreach(VALUE hash, st_foreach_callback_func *func, st_data_t arg);
5834
5835
5836int rb_hash_stlike_foreach_with_replace(VALUE hash, st_foreach_check_callback_func *func, st_update_callback_func *replace, st_data_t arg);
5837int rb_hash_stlike_update(VALUE hash, st_data_t key, st_update_callback_func func, st_data_t arg);
5838void rb_call_inits(void);
5839void ruby_set_inplace_mode(const char *);
5840void rb_stdio_set_default_encoding(void);
5841VALUE rb_io_flush_raw(VALUE, int);
5842int rb_stderr_tty_p(void);
5843void rb_io_fptr_finalize_internal(void *ptr);
5844VALUE rb_get_expanded_load_path(void);
5845int rb_require_internal(VALUE fname);
5846__attribute__ ((__noreturn__)) void rb_load_fail(VALUE, const char*);
5847extern const char ruby_exec_prefix[];
5848extern const char ruby_initial_load_paths[];
5849int Init_enc_set_filesystem_encoding(void);
5850VALUE rb_math_atan2(VALUE, VALUE);
5851VALUE rb_math_cos(VALUE);
5852VALUE rb_math_cosh(VALUE);
5853VALUE rb_math_exp(VALUE);
5854VALUE rb_math_hypot(VALUE, VALUE);
5855VALUE rb_math_log(int argc, const VALUE *argv);
5856VALUE rb_math_sin(VALUE);
5857VALUE rb_math_sinh(VALUE);
5858extern _Bool mjit_enabled;
5859VALUE mjit_pause(_Bool wait_p);
5860VALUE mjit_resume(void);
5861void mjit_finish(_Bool close_handle_p);
5862void Init_newline(void);
5863enum ruby_num_rounding_mode {
5864 RUBY_NUM_ROUND_HALF_UP,
5865 RUBY_NUM_ROUND_HALF_EVEN,
5866 RUBY_NUM_ROUND_HALF_DOWN,
5867 RUBY_NUM_ROUND_DEFAULT = RUBY_NUM_ROUND_HALF_UP
5868};
5869int rb_num_to_uint(VALUE val, unsigned int *ret);
5870VALUE ruby_num_interval_step_size(VALUE from, VALUE to, VALUE step, int excl);
5871double ruby_float_step_size(double beg, double end, double unit, int excl);
5872int ruby_float_step(VALUE from, VALUE to, VALUE step, int excl, int allow_endless);
5873double ruby_float_mod(double x, double y);
5874int rb_num_negative_p(VALUE);
5875VALUE rb_int_succ(VALUE num);
5876VALUE rb_int_uminus(VALUE num);
5877VALUE rb_float_uminus(VALUE num);
5878VALUE rb_int_plus(VALUE x, VALUE y);
5879VALUE rb_float_plus(VALUE x, VALUE y);
5880VALUE rb_int_minus(VALUE x, VALUE y);
5881VALUE rb_int_mul(VALUE x, VALUE y);
5882VALUE rb_float_mul(VALUE x, VALUE y);
5883VALUE rb_float_div(VALUE x, VALUE y);
5884VALUE rb_int_idiv(VALUE x, VALUE y);
5885VALUE rb_int_modulo(VALUE x, VALUE y);
5886VALUE rb_int2str(VALUE num, int base);
5887VALUE rb_fix_plus(VALUE x, VALUE y);
5888VALUE rb_fix_aref(VALUE fix, VALUE idx);
5889VALUE rb_int_gt(VALUE x, VALUE y);
5890int rb_float_cmp(VALUE x, VALUE y);
5891VALUE rb_float_gt(VALUE x, VALUE y);
5892VALUE rb_int_ge(VALUE x, VALUE y);
5893enum ruby_num_rounding_mode rb_num_get_rounding_option(VALUE opts);
5894double rb_int_fdiv_double(VALUE x, VALUE y);
5895VALUE rb_int_pow(VALUE x, VALUE y);
5896VALUE rb_float_pow(VALUE x, VALUE y);
5897VALUE rb_int_cmp(VALUE x, VALUE y);
5898VALUE rb_int_equal(VALUE x, VALUE y);
5899VALUE rb_int_divmod(VALUE x, VALUE y);
5900VALUE rb_int_and(VALUE x, VALUE y);
5901VALUE rb_int_lshift(VALUE x, VALUE y);
5902VALUE rb_int_div(VALUE x, VALUE y);
5903VALUE rb_int_abs(VALUE num);
5904VALUE rb_int_odd_p(VALUE num);
5905int rb_int_positive_p(VALUE num);
5906int rb_int_negative_p(VALUE num);
5907VALUE rb_num_pow(VALUE x, VALUE y);
5908VALUE rb_float_ceil(VALUE num, int ndigits);
5909static inline VALUE
5910rb_num_compare_with_zero(VALUE num, ID mid)
5911{
5912 VALUE zero = (((VALUE)(0))<<1 | RUBY_FIXNUM_FLAG);
5913 VALUE r = rb_check_funcall(num, mid, 1, &zero);
5914 if (r == ((VALUE)RUBY_Qundef)) {
5915 rb_cmperr(num, zero);
5916 }
5917 return r;
5918}
5919static inline int
5920rb_num_positive_int_p(VALUE num)
5921{
5922 const ID mid = '>';
5923 if ((((int)(long)(num))&RUBY_FIXNUM_FLAG)) {
5925 return ((long)(num) > (long)(((VALUE)(0))<<1 | RUBY_FIXNUM_FLAG));
5926 }
5927 else if (( ((RUBY_T_BIGNUM) == RUBY_T_FIXNUM) ? (((int)(long)(num))&RUBY_FIXNUM_FLAG) : ((RUBY_T_BIGNUM) == RUBY_T_TRUE) ? ((num) == ((VALUE)RUBY_Qtrue)) : ((RUBY_T_BIGNUM) == RUBY_T_FALSE) ? ((num) == ((VALUE)RUBY_Qfalse)) : ((RUBY_T_BIGNUM) == RUBY_T_NIL) ? ((num) == ((VALUE)RUBY_Qnil)) : ((RUBY_T_BIGNUM) == RUBY_T_UNDEF) ? ((num) == ((VALUE)RUBY_Qundef)) : ((RUBY_T_BIGNUM) == RUBY_T_SYMBOL) ? ((((VALUE)(num)&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG)||(!(((VALUE)(num) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(num) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(num))->flags & RUBY_T_MASK) == (RUBY_T_SYMBOL))) : ((RUBY_T_BIGNUM) == RUBY_T_FLOAT) ? ( ((((int)(long)(num))&RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG) || (!(((VALUE)(num) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(num) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(num))->flags & RUBY_T_MASK) == RUBY_T_FLOAT)) : (!(((VALUE)(num) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(num) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(num))->flags & RUBY_T_MASK) == (RUBY_T_BIGNUM)))) {
5929 return ((((struct RBasic*)(num))->flags & ((VALUE)((VALUE)RUBY_FL_USER1))) != 0);
5930 }
5931 return !(((VALUE)(rb_num_compare_with_zero(num, mid)) & (VALUE)~((VALUE)RUBY_Qnil)) == 0);
5932}
5933static inline int
5934rb_num_negative_int_p(VALUE num)
5935{
5936 const ID mid = '<';
5937 if ((((int)(long)(num))&RUBY_FIXNUM_FLAG)) {
5939 return ((long)(num) < 0);
5940 }
5941 else if (( ((RUBY_T_BIGNUM) == RUBY_T_FIXNUM) ? (((int)(long)(num))&RUBY_FIXNUM_FLAG) : ((RUBY_T_BIGNUM) == RUBY_T_TRUE) ? ((num) == ((VALUE)RUBY_Qtrue)) : ((RUBY_T_BIGNUM) == RUBY_T_FALSE) ? ((num) == ((VALUE)RUBY_Qfalse)) : ((RUBY_T_BIGNUM) == RUBY_T_NIL) ? ((num) == ((VALUE)RUBY_Qnil)) : ((RUBY_T_BIGNUM) == RUBY_T_UNDEF) ? ((num) == ((VALUE)RUBY_Qundef)) : ((RUBY_T_BIGNUM) == RUBY_T_SYMBOL) ? ((((VALUE)(num)&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG)||(!(((VALUE)(num) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(num) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(num))->flags & RUBY_T_MASK) == (RUBY_T_SYMBOL))) : ((RUBY_T_BIGNUM) == RUBY_T_FLOAT) ? ( ((((int)(long)(num))&RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG) || (!(((VALUE)(num) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(num) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(num))->flags & RUBY_T_MASK) == RUBY_T_FLOAT)) : (!(((VALUE)(num) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(num) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(num))->flags & RUBY_T_MASK) == (RUBY_T_BIGNUM)))) {
5943 return (!((((struct RBasic*)(num))->flags & ((VALUE)((VALUE)RUBY_FL_USER1))) != 0));
5944 }
5945 return !(((VALUE)(rb_num_compare_with_zero(num, mid)) & (VALUE)~((VALUE)RUBY_Qnil)) == 0);
5946}
5947VALUE rb_float_abs(VALUE flt);
5948VALUE rb_float_equal(VALUE x, VALUE y);
5949VALUE rb_float_eql(VALUE x, VALUE y);
5950VALUE rb_flo_div_flo(VALUE x, VALUE y);
5951static inline double
5952rb_float_flonum_value(VALUE v)
5953{
5954 if (v != (VALUE)0x8000000000000002) {
5955 union {
5956 double d;
5957 VALUE v;
5958 } t;
5959 VALUE b63 = (v >> 63);
5960 t.v = ((((2 - b63) | (v & ~(VALUE)0x03)) >> (3)) | (((2 - b63) | (v & ~(VALUE)0x03)) << ((sizeof((2 - b63) | (v & ~(VALUE)0x03)) * 8) - 3)));
5961 return t.d;
5962 }
5963 return 0.0;
5964}
5965static inline double
5966rb_float_noflonum_value(VALUE v)
5967{
5968 return ((struct RFloat *)v)->float_value;
5969}
5970static inline double
5971rb_float_value_inline(VALUE v)
5972{
5973 if (((((int)(long)(v))&RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG)) {
5974 return rb_float_flonum_value(v);
5975 }
5976 return rb_float_noflonum_value(v);
5977}
5978static inline VALUE
5979rb_float_new_inline(double d)
5980{
5981 union {
5982 double d;
5983 VALUE v;
5984 } t;
5985 int bits;
5986 t.d = d;
5987 bits = (int)((VALUE)(t.v >> 60) & 0x7);
5988 if (t.v != 0x3000000000000000 &&
5989 !((bits-3) & ~0x01)) {
5990 return ((((t.v) << (3)) | ((t.v) >> ((sizeof(t.v) * 8) - 3))) & ~(VALUE)0x01) | 0x02;
5991 }
5992 else if (t.v == (VALUE)0) {
5993 return 0x8000000000000002;
5994 }
5995 return rb_float_new_in_heap(d);
5996}
5997void rb_obj_copy_ivar(VALUE dest, VALUE obj);
5998__attribute__ ((__const__)) VALUE rb_obj_equal(VALUE obj1, VALUE obj2);
5999__attribute__ ((__const__)) VALUE rb_obj_not(VALUE obj);
6000VALUE rb_class_search_ancestor(VALUE klass, VALUE super);
6001__attribute__ ((__noreturn__)) void rb_undefined_alloc(VALUE klass);
6002double rb_num_to_dbl(VALUE val);
6003VALUE rb_obj_dig(int argc, VALUE *argv, VALUE self, VALUE notfound);
6004VALUE rb_immutable_obj_clone(int, VALUE *, VALUE);
6005VALUE rb_obj_not_equal(VALUE obj1, VALUE obj2);
6006VALUE rb_convert_type_with_id(VALUE,int,const char*,ID);
6007VALUE rb_check_convert_type_with_id(VALUE,int,const char*,ID);
6008int rb_bool_expected(VALUE, const char *);
6009struct RBasicRaw {
6010 VALUE flags;
6011 VALUE klass;
6012};
6013VALUE rb_parser_set_yydebug(VALUE, VALUE);
6014
6015
6016VALUE rb_parser_set_context(VALUE, const struct rb_iseq_struct *, int);
6017
6018
6019void *rb_parser_load_file(VALUE parser, VALUE name);
6020int rb_is_const_name(VALUE name);
6021int rb_is_class_name(VALUE name);
6022int rb_is_instance_name(VALUE name);
6023int rb_is_local_name(VALUE name);
6024__attribute__ ((__pure__)) int rb_is_const_sym(VALUE sym);
6025__attribute__ ((__pure__)) int rb_is_attrset_sym(VALUE sym);
6026ID rb_make_internal_id(void);
6027void rb_gc_free_dsymbol(VALUE);
6028VALUE rb_proc_location(VALUE self);
6029st_index_t rb_hash_proc(st_index_t hash, VALUE proc);
6030int rb_block_arity(void);
6031int rb_block_min_max_arity(int *max);
6032VALUE rb_func_proc_new(rb_block_call_func_t func, VALUE val);
6033VALUE rb_func_lambda_new(rb_block_call_func_t func, VALUE val, int min_argc, int max_argc);
6034VALUE rb_block_to_s(VALUE self, const struct rb_block *block, const char *additional_info);
6035struct waitpid_state;
6036struct rb_execarg {
6037 union {
6038 struct {
6039 VALUE shell_script;
6040 } sh;
6041 struct {
6042 VALUE command_name;
6043 VALUE command_abspath;
6044 VALUE argv_str;
6045 VALUE argv_buf;
6046 } cmd;
6047 } invoke;
6048 VALUE redirect_fds;
6049 VALUE envp_str;
6050 VALUE envp_buf;
6051 VALUE dup2_tmpbuf;
6052 unsigned use_shell : 1;
6053 unsigned pgroup_given : 1;
6054 unsigned umask_given : 1;
6055 unsigned unsetenv_others_given : 1;
6056 unsigned unsetenv_others_do : 1;
6057 unsigned close_others_given : 1;
6058 unsigned close_others_do : 1;
6059 unsigned chdir_given : 1;
6060 unsigned new_pgroup_given : 1;
6061 unsigned new_pgroup_flag : 1;
6062 unsigned uid_given : 1;
6063 unsigned gid_given : 1;
6064 unsigned exception : 1;
6065 unsigned exception_given : 1;
6067 pid_t pgroup_pgid;
6068 VALUE rlimit_limits;
6069 mode_t umask_mask;
6070 uid_t uid;
6071 gid_t gid;
6072 int close_others_maxhint;
6073 VALUE fd_dup2;
6074 VALUE fd_close;
6075 VALUE fd_open;
6076 VALUE fd_dup2_child;
6077 VALUE env_modification;
6078 VALUE path_env;
6079 VALUE chdir_dir;
6080};
6081static inline size_t
6082ARGVSTR2ARGC(VALUE argv_str)
6083{
6084 size_t i = 0;
6085 char *const *p = ((char **)((void *)(((const struct rb_imemo_tmpbuf_struct *)(argv_str))->ptr)) + 1);
6086 while (p[i++])
6087 ;
6088 return i - 1;
6089}
6090pid_t rb_fork_ruby(int *status);
6091void rb_last_status_clear(void);
6092VALUE rb_rational_canonicalize(VALUE x);
6093VALUE rb_rational_uminus(VALUE self);
6094VALUE rb_rational_plus(VALUE self, VALUE other);
6095VALUE rb_rational_mul(VALUE self, VALUE other);
6096VALUE rb_lcm(VALUE x, VALUE y);
6097VALUE rb_rational_reciprocal(VALUE x);
6098VALUE rb_cstr_to_rat(const char *, int);
6099VALUE rb_rational_abs(VALUE self);
6100VALUE rb_rational_cmp(VALUE self, VALUE other);
6101VALUE rb_rational_pow(VALUE self, VALUE other);
6102VALUE rb_numeric_quo(VALUE x, VALUE y);
6103VALUE rb_float_numerator(VALUE x);
6104VALUE rb_float_denominator(VALUE x);
6105VALUE rb_reg_compile(VALUE str, int options, const char *sourcefile, int sourceline);
6106VALUE rb_reg_check_preprocess(VALUE);
6107long rb_reg_search0(VALUE, VALUE, long, int, int);
6108VALUE rb_reg_match_p(VALUE re, VALUE str, long pos);
6109_Bool rb_reg_start_with_p(VALUE re, VALUE str);
6110void rb_backref_set_string(VALUE string, long pos, long len);
6111void rb_match_unbusy(VALUE);
6112int rb_match_count(VALUE match);
6113int rb_match_nth_defined(int nth, VALUE match);
6114VALUE rb_reg_new_ary(VALUE ary, int options);
6115extern int ruby_enable_coredump;
6116int rb_get_next_signal(void);
6117VALUE rb_fstring(VALUE);
6118VALUE rb_fstring_new(const char *ptr, long len);
6119VALUE rb_fstring_cstr(const char *str);
6120int rb_str_buf_cat_escaped_char(VALUE result, unsigned int c, int unicode_p);
6121int rb_str_symname_p(VALUE);
6122VALUE rb_str_quote_unprintable(VALUE);
6123VALUE rb_id_quote_unprintable(ID);
6124char *rb_str_fill_terminator(VALUE str, const int termlen);
6125void rb_str_change_terminator_length(VALUE str, const int oldtermlen, const int termlen);
6126VALUE rb_str_locktmp_ensure(VALUE str, VALUE (*func)(VALUE), VALUE arg);
6127VALUE rb_str_chomp_string(VALUE str, VALUE chomp);
6128size_t rb_str_memsize(VALUE);
6129VALUE rb_sym_proc_call(ID mid, int argc, const VALUE *argv, int kw_splat, VALUE passed_proc);
6130VALUE rb_sym_to_proc(VALUE sym);
6131char *rb_str_to_cstr(VALUE str);
6132VALUE rb_str_eql(VALUE str1, VALUE str2);
6133VALUE rb_obj_as_string_result(VALUE str, VALUE obj);
6134const char *ruby_escaped_char(int c);
6135VALUE rb_str_opt_plus(VALUE, VALUE);
6136static inline VALUE
6137rb_str_eql_internal(const VALUE str1, const VALUE str2)
6138{
6139 const long len = (!(((struct RBasic*)(str1))->flags & RSTRING_NOEMBED) ? (long)((((struct RBasic*)(str1))->flags >> RSTRING_EMBED_LEN_SHIFT) & (RSTRING_EMBED_LEN_MASK >> RSTRING_EMBED_LEN_SHIFT)) : ((struct RString*)(str1))->as.heap.len);
6140 const char *ptr1, *ptr2;
6141 if (len != (!(((struct RBasic*)(str2))->flags & RSTRING_NOEMBED) ? (long)((((struct RBasic*)(str2))->flags >> RSTRING_EMBED_LEN_SHIFT) & (RSTRING_EMBED_LEN_MASK >> RSTRING_EMBED_LEN_SHIFT)) : ((struct RString*)(str2))->as.heap.len)) return ((VALUE)RUBY_Qfalse);
6142 if (!rb_str_comparable(str1, str2)) return ((VALUE)RUBY_Qfalse);
6143 if ((ptr1 = (!(((struct RBasic*)(str1))->flags & RSTRING_NOEMBED) ? ((struct RString*)(str1))->as.ary : ((struct RString*)(str1))->as.heap.ptr)) == (ptr2 = (!(((struct RBasic*)(str2))->flags & RSTRING_NOEMBED) ? ((struct RString*)(str2))->as.ary : ((struct RString*)(str2))->as.heap.ptr)))
6144 return ((VALUE)RUBY_Qtrue);
6145 if (memcmp(ptr1, ptr2, len) == 0)
6146 return ((VALUE)RUBY_Qtrue);
6147 return ((VALUE)RUBY_Qfalse);
6148}
6149VALUE rb_sym_intern_ascii(const char *ptr, long len);
6150VALUE rb_sym_intern_ascii_cstr(const char *ptr);
6151VALUE rb_to_symbol_type(VALUE obj);
6152VALUE rb_struct_init_copy(VALUE copy, VALUE s);
6153VALUE rb_struct_lookup(VALUE s, VALUE idx);
6154VALUE rb_struct_s_keyword_init(VALUE klass);
6155struct timeval rb_time_timeval(VALUE);
6156VALUE rb_obj_is_mutex(VALUE obj);
6157VALUE rb_suppress_tracing(VALUE (*func)(VALUE), VALUE arg);
6158void rb_thread_execute_interrupts(VALUE th);
6159VALUE rb_get_coverages(void);
6160int rb_get_coverage_mode(void);
6161VALUE rb_default_coverage(int);
6162VALUE rb_thread_shield_new(void);
6163VALUE rb_thread_shield_wait(VALUE self);
6164VALUE rb_thread_shield_release(VALUE self);
6165VALUE rb_thread_shield_destroy(VALUE self);
6166int rb_thread_to_be_killed(VALUE thread);
6167void rb_mutex_allow_trap(VALUE self, int val);
6168VALUE rb_uninterruptible(VALUE (*b_proc)(VALUE), VALUE data);
6169VALUE rb_mutex_owned_p(VALUE self);
6170extern VALUE rb_cEncodingConverter;
6171char *ruby_dtoa(double d_, int mode, int ndigits, int *decpt, int *sign, char **rve);
6172char *ruby_hdtoa(double d, const char *xdigs, int ndigits, int *decpt, int *sign, char **rve);
6173void rb_gc_mark_global_tbl(void);
6174size_t rb_generic_ivar_memsize(VALUE);
6175VALUE rb_search_class_path(VALUE);
6176VALUE rb_attr_delete(VALUE, ID);
6177VALUE rb_ivar_lookup(VALUE obj, ID id, VALUE undef);
6178void rb_autoload_str(VALUE mod, ID id, VALUE file);
6179VALUE rb_autoload_at_p(VALUE, ID, int);
6180void rb_deprecate_constant(VALUE mod, const char *name);
6181__attribute__ ((__noreturn__)) VALUE rb_mod_const_missing(VALUE,VALUE);
6182rb_gvar_getter_t *rb_gvar_getter_function_of(const struct rb_global_entry *);
6183rb_gvar_setter_t *rb_gvar_setter_function_of(const struct rb_global_entry *);
6184_Bool rb_gvar_is_traced(const struct rb_global_entry *);
6185void rb_gvar_readonly_setter(VALUE v, ID id, VALUE *_);
6186rb_serial_t rb_next_class_serial(void);
6187VALUE rb_obj_is_thread(VALUE obj);
6188void rb_vm_mark(void *ptr);
6189void Init_BareVM(void);
6190void Init_vm_objects(void);
6191__attribute__ ((__pure__)) VALUE rb_vm_top_self(void);
6192void rb_vm_inc_const_missing_count(void);
6193const void **rb_vm_get_insns_address_table(void);
6194VALUE rb_source_location(int *pline);
6195const char *rb_source_location_cstr(int *pline);
6196static void rb_vm_pop_cfunc_frame(void);
6197int rb_vm_add_root_module(ID id, VALUE module);
6198void rb_vm_check_redefinition_by_prepend(VALUE klass);
6199int rb_vm_check_optimizable_mid(VALUE mid);
6200VALUE rb_yield_refine_block(VALUE refinement, VALUE refinements);
6201static VALUE ruby_vm_special_exception_copy(VALUE);
6202__attribute__ ((__pure__)) st_table *rb_vm_fstring_table(void);
6203void rb_print_backtrace(void);
6204void Init_vm_eval(void);
6205VALUE rb_adjust_argv_kw_splat(int *, const VALUE **, int *);
6206VALUE rb_current_realfilepath(void);
6207VALUE rb_check_block_call(VALUE, ID, int, const VALUE *, rb_block_call_func_t, VALUE);
6208typedef void rb_check_funcall_hook(int, VALUE, ID, int, const VALUE *, VALUE);
6209VALUE rb_check_funcall_with_hook(VALUE recv, ID mid, int argc, const VALUE *argv,
6210 rb_check_funcall_hook *hook, VALUE arg);
6211VALUE rb_check_funcall_with_hook_kw(VALUE recv, ID mid, int argc, const VALUE *argv,
6212 rb_check_funcall_hook *hook, VALUE arg, int kw_splat);
6213const char *rb_type_str(enum ruby_value_type type);
6214VALUE rb_check_funcall_default(VALUE, ID, int, const VALUE *, VALUE);
6215VALUE rb_yield_1(VALUE val);
6216VALUE rb_yield_force_blockarg(VALUE values);
6217VALUE rb_lambda_call(VALUE obj, ID mid, int argc, const VALUE *argv,
6218 rb_block_call_func_t bl_proc, int min_argc, int max_argc,
6219 VALUE data2);
6220VALUE rb_equal_opt(VALUE obj1, VALUE obj2);static inline
6221VALUE rb_eql_opt(VALUE obj1, VALUE obj2);static inline
6222void Init_vm_stack_canary(void);
6223void Init_eval_method(void);
6224enum method_missing_reason {
6225 MISSING_NOENTRY = 0x00,
6226 MISSING_PRIVATE = 0x01,
6227 MISSING_PROTECTED = 0x02,
6228 MISSING_FCALL = 0x04,
6229 MISSING_VCALL = 0x08,
6230 MISSING_SUPER = 0x10,
6231 MISSING_MISSING = 0x20,
6232 MISSING_NONE = 0x40
6233};
6238struct rb_calling_info;
6239struct rb_call_data;
6240struct rb_call_cache {
6241 rb_serial_t method_state;
6242 rb_serial_t class_serial[
6243 (64
6244 - sizeof(rb_serial_t)
6245 - sizeof(struct rb_callable_method_entry_struct *)
6246 - sizeof(uintptr_t)
6247 - sizeof(enum method_missing_reason)
6248 - sizeof(VALUE (*)(
6250 struct rb_control_frame_struct *,
6251 struct rb_calling_info *,
6252 const struct rb_call_data *)))
6253 / sizeof(rb_serial_t)
6254 ];
6255 const struct rb_callable_method_entry_struct *me;
6256 uintptr_t method_serial;
6257 VALUE (*call)(struct rb_execution_context_struct *ec,
6258 struct rb_control_frame_struct *cfp,
6259 struct rb_calling_info *calling,
6260 struct rb_call_data *cd);
6261 union {
6262 unsigned int index;
6263 enum method_missing_reason method_missing_reason;
6264 } aux;
6265};
6266__extension__ _Static_assert(sizeof(struct rb_call_cache) <= 64, "cachelined" ": " "sizeof(struct rb_call_cache) <= CACHELINE");
6267struct rb_call_info {
6268 ID mid;
6269 unsigned int flag;
6270 int orig_argc;
6271};
6273 struct rb_call_cache cc;
6274 struct rb_call_info ci;
6275};
6276__attribute__ ((__visibility__("default"))) extern
6277__attribute__ ((__nonnull__(1))) VALUE rb_funcallv_with_cc(struct rb_call_data*, VALUE, ID, int, const VALUE*);
6278__attribute__ ((__visibility__("default"))) extern
6279__attribute__ ((__nonnull__(1))) _Bool rb_method_basic_definition_p_with_cc(struct rb_call_data *, VALUE, ID);
6280void Init_vm_backtrace(void);
6281VALUE rb_vm_thread_backtrace(int argc, const VALUE *argv, VALUE thval);
6282VALUE rb_vm_thread_backtrace_locations(int argc, const VALUE *argv, VALUE thval);
6283VALUE rb_make_backtrace(void);
6284void rb_backtrace_print_as_bugreport(void);
6285int rb_backtrace_p(VALUE obj);
6286VALUE rb_backtrace_to_str_ary(VALUE obj);
6287VALUE rb_backtrace_to_location_ary(VALUE obj);
6288void rb_backtrace_each(VALUE (*iter)(VALUE recv, VALUE str), VALUE output);
6289
6290
6291const char *rb_objspace_data_type_name(VALUE obj);
6292VALUE rb_thread_io_blocking_region(rb_blocking_function_t *func, void *data1, int fd);
6293void rb_ary_detransient(VALUE a);
6294VALUE *rb_ary_ptr_use_start(VALUE ary);
6295void rb_ary_ptr_use_end(VALUE ary);
6296VALUE rb_big_mul_normal(VALUE x, VALUE y);
6297VALUE rb_big_mul_balance(VALUE x, VALUE y);
6298VALUE rb_big_mul_karatsuba(VALUE x, VALUE y);
6299VALUE rb_big_mul_toom3(VALUE x, VALUE y);
6300VALUE rb_big_sq_fast(VALUE x);
6301VALUE rb_big_divrem_normal(VALUE x, VALUE y);
6302VALUE rb_big2str_poweroftwo(VALUE x, int base);
6303VALUE rb_big2str_generic(VALUE x, int base);
6304VALUE rb_str2big_poweroftwo(VALUE arg, int base, int badcheck);
6305VALUE rb_str2big_normal(VALUE arg, int base, int badcheck);
6306VALUE rb_str2big_karatsuba(VALUE arg, int base, int badcheck);
6307VALUE rb_big_mul_gmp(VALUE x, VALUE y);
6308VALUE rb_big_divrem_gmp(VALUE x, VALUE y);
6309VALUE rb_big2str_gmp(VALUE x, int base);
6310VALUE rb_str2big_gmp(VALUE arg, int base, int badcheck);
6311enum rb_int_parse_flags {
6312 RB_INT_PARSE_SIGN = 0x01,
6313 RB_INT_PARSE_UNDERSCORE = 0x02,
6314 RB_INT_PARSE_PREFIX = 0x04,
6315 RB_INT_PARSE_ALL = 0x07,
6316 RB_INT_PARSE_DEFAULT = 0x07
6317};
6318VALUE rb_int_parse_cstr(const char *str, ssize_t len, char **endp, size_t *ndigits, int base, int flags);
6319VALUE rb_arith_seq_new(VALUE obj, VALUE meth, int argc, VALUE const *argv,
6320 rb_enumerator_size_func *size_fn,
6321 VALUE beg, VALUE end, VALUE step, int excl);
6322int rb_bug_reporter_add(void (*func)(FILE *, void *), void *data);
6323__attribute__ ((__noreturn__)) void rb_unexpected_type(VALUE,int);
6324static inline int
6325rb_typeddata_is_instance_of_inline(VALUE obj, const rb_data_type_t *data_type)
6326{
6327 return ( ((RUBY_T_DATA) == RUBY_T_FIXNUM) ? (((int)(long)(obj))&RUBY_FIXNUM_FLAG) : ((RUBY_T_DATA) == RUBY_T_TRUE) ? ((obj) == ((VALUE)RUBY_Qtrue)) : ((RUBY_T_DATA) == RUBY_T_FALSE) ? ((obj) == ((VALUE)RUBY_Qfalse)) : ((RUBY_T_DATA) == RUBY_T_NIL) ? ((obj) == ((VALUE)RUBY_Qnil)) : ((RUBY_T_DATA) == RUBY_T_UNDEF) ? ((obj) == ((VALUE)RUBY_Qundef)) : ((RUBY_T_DATA) == RUBY_T_SYMBOL) ? ((((VALUE)(obj)&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG)||(!(((VALUE)(obj) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(obj) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(obj))->flags & RUBY_T_MASK) == (RUBY_T_SYMBOL))) : ((RUBY_T_DATA) == RUBY_T_FLOAT) ? ( ((((int)(long)(obj))&RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG) || (!(((VALUE)(obj) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(obj) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(obj))->flags & RUBY_T_MASK) == RUBY_T_FLOAT)) : (!(((VALUE)(obj) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(obj) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(obj))->flags & RUBY_T_MASK) == (RUBY_T_DATA))) && (((struct RTypedData*)(obj))->typed_flag == 1) && ((((struct RTypedData*)(obj))->type) == data_type);
6328}
6329VALUE rb_hash_delete_entry(VALUE hash, VALUE key);
6330VALUE rb_ident_hash_new(void);
6331void rb_maygvl_fd_fix_cloexec(int fd);
6332int rb_gc_for_fd(int err);
6333void rb_write_error_str(VALUE mesg);
6334VALUE rb_int_positive_pow(long x, unsigned long y);
6335int rb_opts_exception_p(VALUE opts, int default_value);
6336int rb_exec_async_signal_safe(const struct rb_execarg *e, char *errmsg, size_t errmsg_buflen);
6337pid_t rb_fork_async_signal_safe(int *status, int (*chfunc)(void*, char *, size_t), void *charg, VALUE fds, char *errmsg, size_t errmsg_buflen);
6338VALUE rb_execarg_new(int argc, const VALUE *argv, int accept_shell, int allow_exc_opt);
6339struct rb_execarg *rb_execarg_get(VALUE execarg_obj);
6340int rb_execarg_addopt(VALUE execarg_obj, VALUE key, VALUE val);
6341void rb_execarg_parent_start(VALUE execarg_obj);
6342void rb_execarg_parent_end(VALUE execarg_obj);
6343int rb_execarg_run_options(const struct rb_execarg *e, struct rb_execarg *s, char* errmsg, size_t errmsg_buflen);
6344VALUE rb_execarg_extract_options(VALUE execarg_obj, VALUE opthash);
6345void rb_execarg_setenv(VALUE execarg_obj, VALUE env);
6346VALUE rb_gcd(VALUE x, VALUE y);
6347VALUE rb_gcd_normal(VALUE self, VALUE other);
6348VALUE rb_gcd_gmp(VALUE x, VALUE y);
6349int rb_grantpt(int fd);
6350VALUE rb_str_tmp_frozen_acquire(VALUE str);
6351void rb_str_tmp_frozen_release(VALUE str, VALUE tmp);
6352VALUE rb_str_upto_each(VALUE, VALUE, int, int (*each)(VALUE, VALUE), VALUE);
6353VALUE rb_str_upto_endless_each(VALUE, int (*each)(VALUE, VALUE), VALUE);
6354int ruby_thread_has_gvl_p(void);
6355void ruby_reset_leap_second_info(void);
6356extern const signed char ruby_digit36_to_number_table[];
6357extern const char ruby_hexdigits[];
6358extern unsigned long ruby_scan_digits(const char *str, ssize_t len, int base, size_t *retlen, int *overflow);
6359void rb_mark_generic_ivar(VALUE);
6360void rb_mv_generic_ivar(VALUE src, VALUE dst);
6361VALUE rb_const_missing(VALUE klass, VALUE name);
6362int rb_class_ivar_set(VALUE klass, ID vid, VALUE value);
6363void rb_iv_tbl_copy(VALUE dst, VALUE src);
6364VALUE rb_wb_protected_newobj_of(VALUE, VALUE);
6365VALUE rb_wb_unprotected_newobj_of(VALUE, VALUE);
6366size_t rb_obj_memsize_of(VALUE);
6367void rb_gc_verify_internal_consistency(void);
6368size_t rb_obj_gc_flags(VALUE, ID[], size_t);
6369void rb_gc_mark_values(long n, const VALUE *values);
6370void rb_gc_mark_vm_stack_values(long n, const VALUE *values);
6371VALUE rb_imemo_new(enum imemo_type type, VALUE v1, VALUE v2, VALUE v3, VALUE v0);
6372int ruby_fill_random_bytes(void *, size_t, int);
6373
6374
6375
6376
6377typedef struct rb_vm_struct ruby_vm_t;
6379void ruby_vm_at_exit(void(*func)(ruby_vm_t *));
6380
6381
6382const char *rb_obj_info(VALUE obj);
6383const char *rb_raw_obj_info(char *buff, const int buff_size, VALUE obj);
6384VALUE rb_gc_disable_no_rest(void);
6385struct rb_thread_struct;
6386
6387
6388size_t rb_objspace_data_type_memsize(VALUE obj);
6389void rb_objspace_reachable_objects_from(VALUE obj, void (func)(VALUE, void *), void *data);
6390void rb_objspace_reachable_objects_from_root(void (func)(const char *category, VALUE, void *), void *data);
6391int rb_objspace_markable_object_p(VALUE obj);
6392int rb_objspace_internal_object_p(VALUE obj);
6393int rb_objspace_marked_object_p(VALUE obj);
6394int rb_objspace_garbage_object_p(VALUE obj);
6395void rb_objspace_each_objects(
6396 int (*callback)(void *start, void *end, size_t stride, void *data),
6397 void *data);
6398void rb_objspace_each_objects_without_setup(
6399 int (*callback)(void *, void *, size_t, void *),
6400 void *data);
6401
6402
6403enum node_type {
6404 NODE_SCOPE,
6405 NODE_BLOCK,
6406 NODE_IF,
6407 NODE_UNLESS,
6408 NODE_CASE,
6409 NODE_CASE2,
6410 NODE_CASE3,
6411 NODE_WHEN,
6412 NODE_IN,
6413 NODE_WHILE,
6414 NODE_UNTIL,
6415 NODE_ITER,
6416 NODE_FOR,
6417 NODE_FOR_MASGN,
6418 NODE_BREAK,
6419 NODE_NEXT,
6420 NODE_REDO,
6421 NODE_RETRY,
6422 NODE_BEGIN,
6423 NODE_RESCUE,
6424 NODE_RESBODY,
6425 NODE_ENSURE,
6426 NODE_AND,
6427 NODE_OR,
6428 NODE_MASGN,
6429 NODE_LASGN,
6430 NODE_DASGN,
6431 NODE_DASGN_CURR,
6432 NODE_GASGN,
6433 NODE_IASGN,
6434 NODE_CDECL,
6435 NODE_CVASGN,
6436 NODE_OP_ASGN1,
6437 NODE_OP_ASGN2,
6438 NODE_OP_ASGN_AND,
6439 NODE_OP_ASGN_OR,
6440 NODE_OP_CDECL,
6441 NODE_CALL,
6442 NODE_OPCALL,
6443 NODE_FCALL,
6444 NODE_VCALL,
6445 NODE_QCALL,
6446 NODE_SUPER,
6447 NODE_ZSUPER,
6448 NODE_LIST,
6449 NODE_ZLIST,
6450 NODE_VALUES,
6451 NODE_HASH,
6452 NODE_RETURN,
6453 NODE_YIELD,
6454 NODE_LVAR,
6455 NODE_DVAR,
6456 NODE_GVAR,
6457 NODE_IVAR,
6458 NODE_CONST,
6459 NODE_CVAR,
6460 NODE_NTH_REF,
6461 NODE_BACK_REF,
6462 NODE_MATCH,
6463 NODE_MATCH2,
6464 NODE_MATCH3,
6465 NODE_LIT,
6466 NODE_STR,
6467 NODE_DSTR,
6468 NODE_XSTR,
6469 NODE_DXSTR,
6470 NODE_EVSTR,
6471 NODE_DREGX,
6472 NODE_ONCE,
6473 NODE_ARGS,
6474 NODE_ARGS_AUX,
6475 NODE_OPT_ARG,
6476 NODE_KW_ARG,
6477 NODE_POSTARG,
6478 NODE_ARGSCAT,
6479 NODE_ARGSPUSH,
6480 NODE_SPLAT,
6481 NODE_BLOCK_PASS,
6482 NODE_DEFN,
6483 NODE_DEFS,
6484 NODE_ALIAS,
6485 NODE_VALIAS,
6486 NODE_UNDEF,
6487 NODE_CLASS,
6488 NODE_MODULE,
6489 NODE_SCLASS,
6490 NODE_COLON2,
6491 NODE_COLON3,
6492 NODE_DOT2,
6493 NODE_DOT3,
6494 NODE_FLIP2,
6495 NODE_FLIP3,
6496 NODE_SELF,
6497 NODE_NIL,
6498 NODE_TRUE,
6499 NODE_FALSE,
6500 NODE_ERRINFO,
6501 NODE_DEFINED,
6502 NODE_POSTEXE,
6503 NODE_DSYM,
6504 NODE_ATTRASGN,
6505 NODE_LAMBDA,
6506 NODE_ARYPTN,
6507 NODE_HSHPTN,
6508 NODE_LAST
6509};
6510typedef struct rb_code_position_struct {
6511 int lineno;
6512 int column;
6514typedef struct rb_code_location_struct {
6515 rb_code_position_t beg_pos;
6516 rb_code_position_t end_pos;
6518static inline rb_code_location_t
6519code_loc_gen(rb_code_location_t *loc1, rb_code_location_t *loc2)
6520{
6522 loc.beg_pos = loc1->beg_pos;
6523 loc.end_pos = loc2->end_pos;
6524 return loc;
6525}
6526typedef struct RNode {
6527 VALUE flags;
6528 union {
6529 struct RNode *node;
6530 ID id;
6531 VALUE value;
6532 ID *tbl;
6533 } u1;
6534 union {
6535 struct RNode *node;
6536 ID id;
6537 long argc;
6538 VALUE value;
6539 } u2;
6540 union {
6541 struct RNode *node;
6542 ID id;
6543 long state;
6544 struct rb_global_entry *entry;
6545 struct rb_args_info *args;
6546 struct rb_ary_pattern_info *apinfo;
6547 VALUE value;
6548 } u3;
6549 rb_code_location_t nd_loc;
6550 int node_id;
6551} NODE;
6552VALUE rb_node_case_when_optimizable_literal(const NODE *const node);
6553
6554
6555typedef struct node_buffer_struct node_buffer_t;
6556typedef struct rb_ast_body_struct {
6557 const NODE *root;
6558 VALUE compile_option;
6559 int line_count;
6561typedef struct rb_ast_struct {
6562 VALUE flags;
6563 node_buffer_t *node_buffer;
6564 rb_ast_body_t body;
6565} rb_ast_t;
6566rb_ast_t *rb_ast_new(void);
6567void rb_ast_mark(rb_ast_t*);
6568void rb_ast_update_references(rb_ast_t*);
6569void rb_ast_dispose(rb_ast_t*);
6570void rb_ast_free(rb_ast_t*);
6571size_t rb_ast_memsize(const rb_ast_t*);
6572void rb_ast_add_mark_object(rb_ast_t*, VALUE);
6573NODE *rb_ast_newnode(rb_ast_t*, enum node_type type);
6574void rb_ast_delete_node(rb_ast_t*, NODE *n);
6575VALUE rb_parser_new(void);
6576VALUE rb_parser_end_seen_p(VALUE);
6577VALUE rb_parser_encoding(VALUE);
6578VALUE rb_parser_set_yydebug(VALUE, VALUE);
6579VALUE rb_parser_dump_tree(const NODE *node, int comment);
6580void rb_parser_set_options(VALUE, int, int, int, int);
6581rb_ast_t *rb_parser_compile_string(VALUE, const char*, VALUE, int);
6582rb_ast_t *rb_parser_compile_string_path(VALUE vparser, VALUE fname, VALUE src, int line);
6583rb_ast_t *rb_parser_compile_file_path(VALUE vparser, VALUE fname, VALUE input, int line);
6584rb_ast_t *rb_parser_compile_generic(VALUE vparser, VALUE (*lex_gets)(VALUE, int), VALUE fname, VALUE input, int line);
6585void rb_node_init(NODE *n, enum node_type type, VALUE a0, VALUE a1, VALUE a2);
6586const char *ruby_node_name(int node);
6587const struct kwtable *rb_reserved_word(const char *, unsigned int);
6588struct rb_args_info {
6589 NODE *pre_init;
6590 NODE *post_init;
6591 int pre_args_num;
6592 int post_args_num;
6593 ID first_post_arg;
6594 ID rest_arg;
6595 ID block_arg;
6596 NODE *kw_args;
6597 NODE *kw_rest_arg;
6598 NODE *opt_args;
6599 unsigned int no_kwarg: 1;
6600 unsigned int ruby2_keywords: 1;
6601 VALUE imemo;
6602};
6604 NODE *pre_args;
6605 NODE *rest_arg;
6606 NODE *post_args;
6607 VALUE imemo;
6608};
6609struct parser_params;
6610void *rb_parser_malloc(struct parser_params *, size_t);
6611void *rb_parser_realloc(struct parser_params *, void *, size_t);
6612void *rb_parser_calloc(struct parser_params *, size_t, size_t);
6613void rb_parser_free(struct parser_params *, void *);
6614void rb_parser_printf(struct parser_params *parser, const char *fmt, ...) __attribute__((format(printf, 2, 3)));
6615
6616
6617enum ruby_id_types {
6618 RUBY_ID_STATIC_SYM = 0x01,
6619 RUBY_ID_LOCAL = 0x00,
6620 RUBY_ID_INSTANCE = (0x01<<1),
6621 RUBY_ID_GLOBAL = (0x03<<1),
6622 RUBY_ID_ATTRSET = (0x04<<1),
6623 RUBY_ID_CONST = (0x05<<1),
6624 RUBY_ID_CLASS = (0x06<<1),
6625 RUBY_ID_JUNK = (0x07<<1),
6626 RUBY_ID_INTERNAL = RUBY_ID_JUNK,
6627 RUBY_ID_SCOPE_SHIFT = 4,
6628 RUBY_ID_SCOPE_MASK = (~(~0U<<(RUBY_ID_SCOPE_SHIFT-1))<<1)
6629};
6630enum ruby_method_ids {
6631 idDot2 = 128,
6632 idDot3 = 129,
6633 idUPlus = 132,
6634 idUMinus = 133,
6635 idPow = 134,
6636 idCmp = 135,
6637 idPLUS = '+',
6638 idMINUS = '-',
6639 idMULT = '*',
6640 idDIV = '/',
6641 idMOD = '%',
6642 idLTLT = 136,
6643 idGTGT = 137,
6644 idLT = '<',
6645 idLE = 138,
6646 idGT = '>',
6647 idGE = 139,
6648 idEq = 140,
6649 idEqq = 141,
6650 idNeq = 142,
6651 idNot = '!',
6652 idAnd = '&',
6653 idOr = '|',
6654 idBackquote = '`',
6655 idEqTilde = 143,
6656 idNeqTilde = 144,
6657 idAREF = 145,
6658 idASET = 146,
6659 idCOLON2 = 147,
6660 idANDOP = 148,
6661 idOROP = 149,
6662 idANDDOT = 150,
6663 tPRESERVED_ID_BEGIN = 150,
6664 idNilP,
6665 idNULL,
6666 idEmptyP,
6667 idEqlP,
6668 idRespond_to,
6669 idRespond_to_missing,
6670 idIFUNC,
6671 idCFUNC,
6672 id_core_set_method_alias,
6673 id_core_set_variable_alias,
6674 id_core_undef_method,
6675 id_core_define_method,
6676 id_core_define_singleton_method,
6677 id_core_set_postexe,
6678 id_core_hash_merge_ptr,
6679 id_core_hash_merge_kwd,
6680 id_core_raise,
6681 id_debug_created_info,
6682 tPRESERVED_ID_END,
6683 tTOKEN_LOCAL_BEGIN = tPRESERVED_ID_END-1,
6684 tMax,
6685 tMin,
6686 tFreeze,
6687 tInspect,
6688 tIntern,
6689 tObject_id,
6690 tConst_missing,
6691 tMethodMissing,
6692 tMethod_added,
6693 tSingleton_method_added,
6694 tMethod_removed,
6695 tSingleton_method_removed,
6696 tMethod_undefined,
6697 tSingleton_method_undefined,
6698 tLength,
6699 tSize,
6700 tGets,
6701 tSucc,
6702 tEach,
6703 tProc,
6704 tLambda,
6705 tSend,
6706 t__send__,
6707 t__attached__,
6708 tInitialize,
6709 tInitialize_copy,
6710 tInitialize_clone,
6711 tInitialize_dup,
6712 tTo_int,
6713 tTo_ary,
6714 tTo_str,
6715 tTo_sym,
6716 tTo_hash,
6717 tTo_proc,
6718 tTo_io,
6719 tTo_a,
6720 tTo_s,
6721 tTo_i,
6722 tTo_f,
6723 tTo_r,
6724 tBt,
6725 tBt_locations,
6726 tCall,
6727 tMesg,
6728 tException,
6729 tLocals,
6730 tNOT,
6731 tAND,
6732 tOR,
6733 tDiv,
6734 tDivmod,
6735 tFdiv,
6736 tQuo,
6737 tName,
6738 tNil,
6739 tUScore,
6740 tNUMPARAM_1,
6741 tNUMPARAM_2,
6742 tNUMPARAM_3,
6743 tNUMPARAM_4,
6744 tNUMPARAM_5,
6745 tNUMPARAM_6,
6746 tNUMPARAM_7,
6747 tNUMPARAM_8,
6748 tNUMPARAM_9,
6749 tTOKEN_LOCAL_END,
6750 tTOKEN_INSTANCE_BEGIN = tTOKEN_LOCAL_END-1,
6751 tTOKEN_INSTANCE_END,
6752 tTOKEN_GLOBAL_BEGIN = tTOKEN_INSTANCE_END-1,
6753 tLASTLINE,
6754 tBACKREF,
6755 tERROR_INFO,
6756 tTOKEN_GLOBAL_END,
6757 tTOKEN_CONST_BEGIN = tTOKEN_GLOBAL_END-1,
6758 tTOKEN_CONST_END,
6759 tTOKEN_CLASS_BEGIN = tTOKEN_CONST_END-1,
6760 tTOKEN_CLASS_END,
6761 tTOKEN_ATTRSET_BEGIN = tTOKEN_CLASS_END-1,
6762 tTOKEN_ATTRSET_END,
6763 tNEXT_ID = tTOKEN_ATTRSET_END,
6764 idMax = ((tMax<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
6765 idMin = ((tMin<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
6766 idFreeze = ((tFreeze<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
6767 idInspect = ((tInspect<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
6768 idIntern = ((tIntern<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
6769 idObject_id = ((tObject_id<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
6770 idConst_missing = ((tConst_missing<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
6771 idMethodMissing = ((tMethodMissing<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
6772 idMethod_added = ((tMethod_added<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
6773 idSingleton_method_added = ((tSingleton_method_added<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
6774 idMethod_removed = ((tMethod_removed<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
6775 idSingleton_method_removed = ((tSingleton_method_removed<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
6776 idMethod_undefined = ((tMethod_undefined<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
6777 idSingleton_method_undefined = ((tSingleton_method_undefined<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
6778 idLength = ((tLength<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
6779 idSize = ((tSize<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
6780 idGets = ((tGets<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
6781 idSucc = ((tSucc<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
6782 idEach = ((tEach<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
6783 idProc = ((tProc<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
6784 idLambda = ((tLambda<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
6785 idSend = ((tSend<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
6786 id__send__ = ((t__send__<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
6787 id__attached__ = ((t__attached__<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
6788 idInitialize = ((tInitialize<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
6789 idInitialize_copy = ((tInitialize_copy<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
6790 idInitialize_clone = ((tInitialize_clone<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
6791 idInitialize_dup = ((tInitialize_dup<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
6792 idTo_int = ((tTo_int<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
6793 idTo_ary = ((tTo_ary<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
6794 idTo_str = ((tTo_str<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
6795 idTo_sym = ((tTo_sym<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
6796 idTo_hash = ((tTo_hash<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
6797 idTo_proc = ((tTo_proc<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
6798 idTo_io = ((tTo_io<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
6799 idTo_a = ((tTo_a<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
6800 idTo_s = ((tTo_s<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
6801 idTo_i = ((tTo_i<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
6802 idTo_f = ((tTo_f<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
6803 idTo_r = ((tTo_r<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
6804 idBt = ((tBt<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
6805 idBt_locations = ((tBt_locations<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
6806 idCall = ((tCall<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
6807 idMesg = ((tMesg<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
6808 idException = ((tException<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
6809 idLocals = ((tLocals<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
6810 idNOT = ((tNOT<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
6811 idAND = ((tAND<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
6812 idOR = ((tOR<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
6813 idDiv = ((tDiv<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
6814 idDivmod = ((tDivmod<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
6815 idFdiv = ((tFdiv<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
6816 idQuo = ((tQuo<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
6817 idName = ((tName<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
6818 idNil = ((tNil<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
6819 idUScore = ((tUScore<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
6820 idNUMPARAM_1 = ((tNUMPARAM_1<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
6821 idNUMPARAM_2 = ((tNUMPARAM_2<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
6822 idNUMPARAM_3 = ((tNUMPARAM_3<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
6823 idNUMPARAM_4 = ((tNUMPARAM_4<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
6824 idNUMPARAM_5 = ((tNUMPARAM_5<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
6825 idNUMPARAM_6 = ((tNUMPARAM_6<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
6826 idNUMPARAM_7 = ((tNUMPARAM_7<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
6827 idNUMPARAM_8 = ((tNUMPARAM_8<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
6828 idNUMPARAM_9 = ((tNUMPARAM_9<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
6829 idLASTLINE = ((tLASTLINE<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_GLOBAL|RUBY_ID_STATIC_SYM),
6830 idBACKREF = ((tBACKREF<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_GLOBAL|RUBY_ID_STATIC_SYM),
6831 idERROR_INFO = ((tERROR_INFO<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_GLOBAL|RUBY_ID_STATIC_SYM),
6832 tLAST_OP_ID = tPRESERVED_ID_END-1,
6833 idLAST_OP_ID = tLAST_OP_ID >> RUBY_ID_SCOPE_SHIFT
6834};
6835typedef enum {
6836 METHOD_VISI_UNDEF = 0x00,
6837 METHOD_VISI_PUBLIC = 0x01,
6838 METHOD_VISI_PRIVATE = 0x02,
6839 METHOD_VISI_PROTECTED = 0x03,
6840 METHOD_VISI_MASK = 0x03
6841} rb_method_visibility_t;
6842typedef struct rb_scope_visi_struct {
6843 rb_method_visibility_t method_visi : 3;
6844 unsigned int module_func : 1;
6846typedef struct rb_cref_struct {
6847 VALUE flags;
6848 VALUE refinements;
6849 VALUE klass;
6850 struct rb_cref_struct * next;
6851 const rb_scope_visibility_t scope_visi;
6852} rb_cref_t;
6853typedef struct rb_method_entry_struct {
6854 VALUE flags;
6855 VALUE defined_class;
6856 struct rb_method_definition_struct * const def;
6857 ID called_id;
6858 VALUE owner;
6860typedef struct rb_callable_method_entry_struct {
6861 VALUE flags;
6862 const VALUE defined_class;
6863 struct rb_method_definition_struct * const def;
6864 ID called_id;
6865 const VALUE owner;
6867static inline void
6868METHOD_ENTRY_VISI_SET(rb_method_entry_t *me, rb_method_visibility_t visi)
6869{
6870 ((void)0);
6871 me->flags = (me->flags & ~(((VALUE)RUBY_FL_USER4) | ((VALUE)RUBY_FL_USER5))) | (visi << ((((VALUE)RUBY_FL_USHIFT) + 4)+0));
6872}
6873static inline void
6874METHOD_ENTRY_BASIC_SET(rb_method_entry_t *me, unsigned int basic)
6875{
6876 ((void)0);
6877 me->flags = (me->flags & ~(((VALUE)RUBY_FL_USER6) )) | (basic << ((((VALUE)RUBY_FL_USHIFT) + 4)+2));
6878}
6879static inline void
6880METHOD_ENTRY_FLAGS_SET(rb_method_entry_t *me, rb_method_visibility_t visi, unsigned int basic)
6881{
6882 ((void)0);
6883 ((void)0);
6884 me->flags =
6885 (me->flags & ~(((VALUE)RUBY_FL_USER4)|((VALUE)RUBY_FL_USER5)|((VALUE)RUBY_FL_USER6))) |
6886 ((visi << ((((VALUE)RUBY_FL_USHIFT) + 4)+0)) | (basic << ((((VALUE)RUBY_FL_USHIFT) + 4)+2)));
6887}
6888static inline void
6889METHOD_ENTRY_FLAGS_COPY(rb_method_entry_t *dst, const rb_method_entry_t *src)
6890{
6891 dst->flags =
6892 (dst->flags & ~(((VALUE)RUBY_FL_USER4)|((VALUE)RUBY_FL_USER5)|((VALUE)RUBY_FL_USER6))) |
6893 (src->flags & (((VALUE)RUBY_FL_USER4)|((VALUE)RUBY_FL_USER5)|((VALUE)RUBY_FL_USER6)));
6894}
6895typedef enum {
6896 VM_METHOD_TYPE_ISEQ,
6897 VM_METHOD_TYPE_CFUNC,
6898 VM_METHOD_TYPE_ATTRSET,
6899 VM_METHOD_TYPE_IVAR,
6900 VM_METHOD_TYPE_BMETHOD,
6901 VM_METHOD_TYPE_ZSUPER,
6902 VM_METHOD_TYPE_ALIAS,
6903 VM_METHOD_TYPE_UNDEF,
6904 VM_METHOD_TYPE_NOTIMPLEMENTED,
6905 VM_METHOD_TYPE_OPTIMIZED,
6906 VM_METHOD_TYPE_MISSING,
6907 VM_METHOD_TYPE_REFINED,
6908
6909} rb_method_type_t;
6910__extension__ _Static_assert(VM_METHOD_TYPE_REFINED <= (1<<4), "VM_METHOD_TYPE_MINIMUM_BITS" ": " "VM_METHOD_TYPE_REFINED <= (1<<VM_METHOD_TYPE_MINIMUM_BITS)");
6911typedef struct rb_iseq_struct rb_iseq_t;
6912typedef struct rb_method_iseq_struct {
6916typedef struct rb_method_cfunc_struct {
6917 VALUE (*func)();
6918 VALUE (*invoker)(VALUE recv, int argc, const VALUE *argv, VALUE (*func)());
6919 int argc;
6921typedef struct rb_method_attr_struct {
6922 ID id;
6923 VALUE location;
6925typedef struct rb_method_alias_struct {
6926 struct rb_method_entry_struct * original_me;
6928typedef struct rb_method_refined_struct {
6929 struct rb_method_entry_struct * orig_me;
6930 VALUE owner;
6932typedef struct rb_method_bmethod_struct {
6933 VALUE proc;
6934 struct rb_hook_list_struct *hooks;
6936enum method_optimized_type {
6937 OPTIMIZED_METHOD_TYPE_SEND,
6938 OPTIMIZED_METHOD_TYPE_CALL,
6939 OPTIMIZED_METHOD_TYPE_BLOCK_CALL,
6940 OPTIMIZED_METHOD_TYPE__MAX
6941};
6943 rb_method_type_t type : 4;
6944 int alias_count : 28;
6945 int complemented_count : 28;
6946 union {
6947 rb_method_iseq_t iseq;
6948 rb_method_cfunc_t cfunc;
6949 rb_method_attr_t attr;
6950 rb_method_alias_t alias;
6951 rb_method_refined_t refined;
6952 rb_method_bmethod_t bmethod;
6953 enum method_optimized_type optimize_type;
6954 } body;
6955 ID original_id;
6956 uintptr_t method_serial;
6957};
6959__extension__ _Static_assert(__builtin_offsetof (rb_method_definition_t, body)==8, "sizeof_method_def" ": " "offsetof(rb_method_definition_t, body)==8");
6960void rb_add_method_cfunc(VALUE klass, ID mid, VALUE (*func)(), int argc, rb_method_visibility_t visi);
6961void rb_add_method_iseq(VALUE klass, ID mid, const rb_iseq_t *iseq, rb_cref_t *cref, rb_method_visibility_t visi);
6962void rb_add_refined_method_entry(VALUE refined_class, ID mid);
6963void rb_add_method(VALUE klass, ID mid, rb_method_type_t type, void *option, rb_method_visibility_t visi);
6964rb_method_entry_t *rb_method_entry_set(VALUE klass, ID mid, const rb_method_entry_t *, rb_method_visibility_t noex);
6965rb_method_entry_t *rb_method_entry_create(ID called_id, VALUE klass, rb_method_visibility_t visi, const rb_method_definition_t *def);
6966const rb_method_entry_t *rb_method_entry_at(VALUE obj, ID id);
6967const rb_method_entry_t *rb_method_entry(VALUE klass, ID id);
6968const rb_method_entry_t *rb_method_entry_with_refinements(VALUE klass, ID id, VALUE *defined_class);
6969const rb_method_entry_t *rb_method_entry_without_refinements(VALUE klass, ID id, VALUE *defined_class);
6970const rb_method_entry_t *rb_resolve_refined_method(VALUE refinements, const rb_method_entry_t *me);
6971
6972
6973const rb_method_entry_t *rb_resolve_me_location(const rb_method_entry_t *, VALUE[5]);
6974
6975
6976const rb_callable_method_entry_t *rb_callable_method_entry(VALUE klass, ID id);
6977const rb_callable_method_entry_t *rb_callable_method_entry_with_refinements(VALUE klass, ID id, VALUE *defined_class);
6978const rb_callable_method_entry_t *rb_callable_method_entry_without_refinements(VALUE klass, ID id, VALUE *defined_class);
6979int rb_method_entry_arity(const rb_method_entry_t *me);
6980int rb_method_entry_eq(const rb_method_entry_t *m1, const rb_method_entry_t *m2);
6981st_index_t rb_hash_method_entry(st_index_t hash, const rb_method_entry_t *me);
6982VALUE rb_method_entry_location(const rb_method_entry_t *me);
6983void rb_free_method_entry(const rb_method_entry_t *me);
6984const rb_method_entry_t *rb_method_entry_clone(const rb_method_entry_t *me);
6985const rb_callable_method_entry_t *rb_method_entry_complement_defined_class(const rb_method_entry_t *src_me, ID called_id, VALUE defined_class);
6986void rb_method_entry_copy(rb_method_entry_t *dst, const rb_method_entry_t *src);
6987void rb_scope_visibility_set(rb_method_visibility_t);
6988VALUE rb_unnamed_parameters(int arity);
6989typedef unsigned int rb_atomic_t;
6990
6991extern void __assert_fail (const char *__assertion, const char *__file,
6992 unsigned int __line, const char *__function)
6993 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__));
6994extern void __assert_perror_fail (int __errnum, const char *__file,
6995 unsigned int __line, const char *__function)
6996 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__));
6997extern void __assert (const char *__assertion, const char *__file, int __line)
6998 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__));
6999
7000static inline char *container_of_or_null_(void *member_ptr, size_t offset)
7001{
7002 return member_ptr ? (char *)member_ptr - offset : ((void *)0);
7003}
7004struct list_node
7005{
7006 struct list_node *next, *prev;
7007};
7008struct list_head
7009{
7010 struct list_node n;
7011};
7012static inline void list_head_init(struct list_head *h)
7013{
7014 h->n.next = h->n.prev = &h->n;
7015}
7016static inline void list_node_init(struct list_node *n)
7017{
7018 n->next = n->prev = n;
7019}
7020static inline void list_add_after_(struct list_head *h,
7021 struct list_node *p,
7022 struct list_node *n,
7023 const char *abortstr)
7024{
7025 n->next = p->next;
7026 n->prev = p;
7027 p->next->prev = n;
7028 p->next = n;
7029 (void)((void)abortstr, h);
7030}
7031static inline void list_add_(struct list_head *h,
7032 struct list_node *n,
7033 const char *abortstr)
7034{
7035 list_add_after_(h, &h->n, n, abortstr);
7036}
7037static inline void list_add_before_(struct list_head *h,
7038 struct list_node *p,
7039 struct list_node *n,
7040 const char *abortstr)
7041{
7042 n->next = p;
7043 n->prev = p->prev;
7044 p->prev->next = n;
7045 p->prev = n;
7046 (void)((void)abortstr, h);
7047}
7048static inline void list_add_tail_(struct list_head *h,
7049 struct list_node *n,
7050 const char *abortstr)
7051{
7052 list_add_before_(h, &h->n, n, abortstr);
7053}
7054static inline int list_empty_(const struct list_head *h, const char* abortstr)
7055{
7056 (void)((void)abortstr, h);
7057 return h->n.next == &h->n;
7058}
7059static inline _Bool list_empty_nocheck(const struct list_head *h)
7060{
7061 return h->n.next == &h->n;
7062}
7063static inline void list_del_(struct list_node *n, const char* abortstr)
7064{
7065 (void)((void)abortstr, n);
7066 n->next->prev = n->prev;
7067 n->prev->next = n->next;
7068}
7069static inline void list_del_init_(struct list_node *n, const char *abortstr)
7070{
7071 list_del_(n, abortstr);
7072 list_node_init(n);
7073}
7074static inline void list_del_from(struct list_head *h, struct list_node *n)
7075{
7076 ((void) sizeof ((!list_empty_(h, "./ccan/list/list.h" ":" "328")) ? 1 : 0), __extension__ ({ if (!list_empty_(h, "./ccan/list/list.h" ":" "328")) ; else __assert_fail ("!list_empty(h)", "./ccan/list/list.h", 328, __extension__ __PRETTY_FUNCTION__); }));
7077 list_del_(n, "./ccan/list/list.h" ":" "329");
7078}
7079static inline void list_swap_(struct list_node *o,
7080 struct list_node *n,
7081 const char* abortstr)
7082{
7083 (void)((void)abortstr, o);
7084 *n = *o;
7085 n->next->prev = n;
7086 n->prev->next = n;
7087}
7088static inline const void *list_top_(const struct list_head *h, size_t off)
7089{
7090 if (list_empty_(h, "./ccan/list/list.h" ":" "399"))
7091 return ((void *)0);
7092 return (const char *)h->n.next - off;
7093}
7094static inline const void *list_pop_(const struct list_head *h, size_t off)
7095{
7096 struct list_node *n;
7097 if (list_empty_(h, "./ccan/list/list.h" ":" "425"))
7098 return ((void *)0);
7099 n = h->n.next;
7100 list_del_(n, "./ccan/list/list.h" ":" "428");
7101 return (const char *)n - off;
7102}
7103static inline const void *list_tail_(const struct list_head *h, size_t off)
7104{
7105 if (list_empty_(h, "./ccan/list/list.h" ":" "451"))
7106 return ((void *)0);
7107 return (const char *)h->n.prev - off;
7108}
7109static inline void list_append_list_(struct list_head *to,
7110 struct list_head *from,
7111 const char *abortstr)
7112{
7113 struct list_node *from_tail = ((void)abortstr, from)->n.prev;
7114 struct list_node *to_tail = ((void)abortstr, to)->n.prev;
7115 to->n.prev = from_tail;
7116 from_tail->next = &to->n;
7117 to_tail->next = &from->n;
7118 from->n.prev = to_tail;
7119 list_del_(&from->n, "./ccan/list/list.h" ":" "600");
7120 list_head_init(from);
7121}
7122static inline void list_prepend_list_(struct list_head *to,
7123 struct list_head *from,
7124 const char *abortstr)
7125{
7126 struct list_node *from_tail = ((void)abortstr, from)->n.prev;
7127 struct list_node *to_head = ((void)abortstr, to)->n.next;
7128 to->n.next = &from->n;
7129 from->n.prev = &to->n;
7130 to_head->prev = from_tail;
7131 from_tail->next = to_head;
7132 list_del_(&from->n, "./ccan/list/list.h" ":" "632");
7133 list_head_init(from);
7134}
7135static inline void *list_node_to_off_(struct list_node *node, size_t off)
7136{
7137 return (void *)((char *)node - off);
7138}
7139static inline struct list_node *list_node_from_off_(void *ptr, size_t off)
7140{
7141 return (struct list_node *)((char *)ptr + off);
7142}
7143static inline void *list_entry_or_null(const struct list_head *h,
7144 const struct list_node *n,
7145 size_t off)
7146{
7147 if (n == &h->n)
7148 return ((void *)0);
7149 return (char *)n - off;
7150}
7151struct sched_param
7152{
7153 int sched_priority;
7154};
7155
7156extern int clone (int (*__fn) (void *__arg), void *__child_stack,
7157 int __flags, void *__arg, ...) __attribute__ ((__nothrow__ , __leaf__));
7158extern int unshare (int __flags) __attribute__ ((__nothrow__ , __leaf__));
7159extern int sched_getcpu (void) __attribute__ ((__nothrow__ , __leaf__));
7160extern int getcpu (unsigned int *, unsigned int *) __attribute__ ((__nothrow__ , __leaf__));
7161extern int setns (int __fd, int __nstype) __attribute__ ((__nothrow__ , __leaf__));
7162
7163typedef unsigned long int __cpu_mask;
7164typedef struct
7165{
7166 __cpu_mask __bits[1024 / (8 * sizeof (__cpu_mask))];
7167} cpu_set_t;
7168
7169extern int __sched_cpucount (size_t __setsize, const cpu_set_t *__setp)
7170 __attribute__ ((__nothrow__ , __leaf__));
7171extern cpu_set_t *__sched_cpualloc (size_t __count) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
7172extern void __sched_cpufree (cpu_set_t *__set) __attribute__ ((__nothrow__ , __leaf__));
7173
7174
7175extern int sched_setparam (__pid_t __pid, const struct sched_param *__param)
7176 __attribute__ ((__nothrow__ , __leaf__));
7177extern int sched_getparam (__pid_t __pid, struct sched_param *__param) __attribute__ ((__nothrow__ , __leaf__));
7178extern int sched_setscheduler (__pid_t __pid, int __policy,
7179 const struct sched_param *__param) __attribute__ ((__nothrow__ , __leaf__));
7180extern int sched_getscheduler (__pid_t __pid) __attribute__ ((__nothrow__ , __leaf__));
7181extern int sched_yield (void) __attribute__ ((__nothrow__ , __leaf__));
7182extern int sched_get_priority_max (int __algorithm) __attribute__ ((__nothrow__ , __leaf__));
7183extern int sched_get_priority_min (int __algorithm) __attribute__ ((__nothrow__ , __leaf__));
7184extern int sched_rr_get_interval (__pid_t __pid, struct timespec *__t) __attribute__ ((__nothrow__ , __leaf__));
7185extern int sched_setaffinity (__pid_t __pid, size_t __cpusetsize,
7186 const cpu_set_t *__cpuset) __attribute__ ((__nothrow__ , __leaf__));
7187extern int sched_getaffinity (__pid_t __pid, size_t __cpusetsize,
7188 cpu_set_t *__cpuset) __attribute__ ((__nothrow__ , __leaf__));
7189
7190struct timex
7191{
7192 unsigned int modes;
7193 __syscall_slong_t offset;
7194 __syscall_slong_t freq;
7195 __syscall_slong_t maxerror;
7196 __syscall_slong_t esterror;
7197 int status;
7198 __syscall_slong_t constant;
7199 __syscall_slong_t precision;
7200 __syscall_slong_t tolerance;
7201 struct timeval time;
7202 __syscall_slong_t tick;
7203 __syscall_slong_t ppsfreq;
7204 __syscall_slong_t jitter;
7205 int shift;
7206 __syscall_slong_t stabil;
7207 __syscall_slong_t jitcnt;
7208 __syscall_slong_t calcnt;
7209 __syscall_slong_t errcnt;
7210 __syscall_slong_t stbcnt;
7211 int tai;
7212 int :32; int :32; int :32; int :32;
7213 int :32; int :32; int :32; int :32;
7214 int :32; int :32; int :32;
7215};
7216
7217extern int clock_adjtime (__clockid_t __clock_id, struct timex *__utx) __attribute__ ((__nothrow__ , __leaf__));
7218
7219struct tm
7220{
7221 int tm_sec;
7222 int tm_min;
7223 int tm_hour;
7224 int tm_mday;
7225 int tm_mon;
7226 int tm_year;
7227 int tm_wday;
7228 int tm_yday;
7229 int tm_isdst;
7230 long int tm_gmtoff;
7231 const char *tm_zone;
7232};
7233struct itimerspec
7234 {
7235 struct timespec it_interval;
7236 struct timespec it_value;
7237 };
7238struct sigevent;
7239
7240extern clock_t clock (void) __attribute__ ((__nothrow__ , __leaf__));
7241extern time_t time (time_t *__timer) __attribute__ ((__nothrow__ , __leaf__));
7242extern double difftime (time_t __time1, time_t __time0)
7243 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
7244extern time_t mktime (struct tm *__tp) __attribute__ ((__nothrow__ , __leaf__));
7245extern size_t strftime (char *__restrict __s, size_t __maxsize,
7246 const char *__restrict __format,
7247 const struct tm *__restrict __tp) __attribute__ ((__nothrow__ , __leaf__));
7248extern char *strptime (const char *__restrict __s,
7249 const char *__restrict __fmt, struct tm *__tp)
7250 __attribute__ ((__nothrow__ , __leaf__));
7251extern size_t strftime_l (char *__restrict __s, size_t __maxsize,
7252 const char *__restrict __format,
7253 const struct tm *__restrict __tp,
7254 locale_t __loc) __attribute__ ((__nothrow__ , __leaf__));
7255extern char *strptime_l (const char *__restrict __s,
7256 const char *__restrict __fmt, struct tm *__tp,
7257 locale_t __loc) __attribute__ ((__nothrow__ , __leaf__));
7258extern struct tm *gmtime (const time_t *__timer) __attribute__ ((__nothrow__ , __leaf__));
7259extern struct tm *localtime (const time_t *__timer) __attribute__ ((__nothrow__ , __leaf__));
7260extern struct tm *gmtime_r (const time_t *__restrict __timer,
7261 struct tm *__restrict __tp) __attribute__ ((__nothrow__ , __leaf__));
7262extern struct tm *localtime_r (const time_t *__restrict __timer,
7263 struct tm *__restrict __tp) __attribute__ ((__nothrow__ , __leaf__));
7264extern char *asctime (const struct tm *__tp) __attribute__ ((__nothrow__ , __leaf__));
7265extern char *ctime (const time_t *__timer) __attribute__ ((__nothrow__ , __leaf__));
7266extern char *asctime_r (const struct tm *__restrict __tp,
7267 char *__restrict __buf) __attribute__ ((__nothrow__ , __leaf__));
7268extern char *ctime_r (const time_t *__restrict __timer,
7269 char *__restrict __buf) __attribute__ ((__nothrow__ , __leaf__));
7270extern char *__tzname[2];
7271extern int __daylight;
7272extern long int __timezone;
7273extern char *tzname[2];
7274extern void tzset (void) __attribute__ ((__nothrow__ , __leaf__));
7275extern int daylight;
7276extern long int timezone;
7277extern int stime (const time_t *__when) __attribute__ ((__nothrow__ , __leaf__));
7278extern time_t timegm (struct tm *__tp) __attribute__ ((__nothrow__ , __leaf__));
7279extern time_t timelocal (struct tm *__tp) __attribute__ ((__nothrow__ , __leaf__));
7280extern int dysize (int __year) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
7281extern int nanosleep (const struct timespec *__requested_time,
7282 struct timespec *__remaining);
7283extern int clock_getres (clockid_t __clock_id, struct timespec *__res) __attribute__ ((__nothrow__ , __leaf__));
7284extern int clock_gettime (clockid_t __clock_id, struct timespec *__tp) __attribute__ ((__nothrow__ , __leaf__));
7285extern int clock_settime (clockid_t __clock_id, const struct timespec *__tp)
7286 __attribute__ ((__nothrow__ , __leaf__));
7287extern int clock_nanosleep (clockid_t __clock_id, int __flags,
7288 const struct timespec *__req,
7289 struct timespec *__rem);
7290extern int clock_getcpuclockid (pid_t __pid, clockid_t *__clock_id) __attribute__ ((__nothrow__ , __leaf__));
7291extern int timer_create (clockid_t __clock_id,
7292 struct sigevent *__restrict __evp,
7293 timer_t *__restrict __timerid) __attribute__ ((__nothrow__ , __leaf__));
7294extern int timer_delete (timer_t __timerid) __attribute__ ((__nothrow__ , __leaf__));
7295extern int timer_settime (timer_t __timerid, int __flags,
7296 const struct itimerspec *__restrict __value,
7297 struct itimerspec *__restrict __ovalue) __attribute__ ((__nothrow__ , __leaf__));
7298extern int timer_gettime (timer_t __timerid, struct itimerspec *__value)
7299 __attribute__ ((__nothrow__ , __leaf__));
7300extern int timer_getoverrun (timer_t __timerid) __attribute__ ((__nothrow__ , __leaf__));
7301extern int timespec_get (struct timespec *__ts, int __base)
7302 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7303extern int getdate_err;
7304extern struct tm *getdate (const char *__string);
7305extern int getdate_r (const char *__restrict __string,
7306 struct tm *__restrict __resbufp);
7307
7308typedef long int __jmp_buf[8];
7309enum
7310{
7311 PTHREAD_CREATE_JOINABLE,
7312 PTHREAD_CREATE_DETACHED
7313};
7314enum
7315{
7316 PTHREAD_MUTEX_TIMED_NP,
7317 PTHREAD_MUTEX_RECURSIVE_NP,
7318 PTHREAD_MUTEX_ERRORCHECK_NP,
7319 PTHREAD_MUTEX_ADAPTIVE_NP
7320 ,
7321 PTHREAD_MUTEX_NORMAL = PTHREAD_MUTEX_TIMED_NP,
7322 PTHREAD_MUTEX_RECURSIVE = PTHREAD_MUTEX_RECURSIVE_NP,
7323 PTHREAD_MUTEX_ERRORCHECK = PTHREAD_MUTEX_ERRORCHECK_NP,
7324 PTHREAD_MUTEX_DEFAULT = PTHREAD_MUTEX_NORMAL
7325 , PTHREAD_MUTEX_FAST_NP = PTHREAD_MUTEX_TIMED_NP
7326};
7327enum
7328{
7329 PTHREAD_MUTEX_STALLED,
7330 PTHREAD_MUTEX_STALLED_NP = PTHREAD_MUTEX_STALLED,
7331 PTHREAD_MUTEX_ROBUST,
7332 PTHREAD_MUTEX_ROBUST_NP = PTHREAD_MUTEX_ROBUST
7333};
7334enum
7335{
7336 PTHREAD_PRIO_NONE,
7337 PTHREAD_PRIO_INHERIT,
7338 PTHREAD_PRIO_PROTECT
7339};
7340enum
7341{
7342 PTHREAD_RWLOCK_PREFER_READER_NP,
7343 PTHREAD_RWLOCK_PREFER_WRITER_NP,
7344 PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP,
7345 PTHREAD_RWLOCK_DEFAULT_NP = PTHREAD_RWLOCK_PREFER_READER_NP
7346};
7347enum
7348{
7349 PTHREAD_INHERIT_SCHED,
7350 PTHREAD_EXPLICIT_SCHED
7351};
7352enum
7353{
7354 PTHREAD_SCOPE_SYSTEM,
7355 PTHREAD_SCOPE_PROCESS
7356};
7357enum
7358{
7359 PTHREAD_PROCESS_PRIVATE,
7360 PTHREAD_PROCESS_SHARED
7361};
7363{
7364 void (*__routine) (void *);
7365 void *__arg;
7366 int __canceltype;
7367 struct _pthread_cleanup_buffer *__prev;
7368};
7369enum
7370{
7371 PTHREAD_CANCEL_ENABLE,
7372 PTHREAD_CANCEL_DISABLE
7373};
7374enum
7375{
7376 PTHREAD_CANCEL_DEFERRED,
7377 PTHREAD_CANCEL_ASYNCHRONOUS
7378};
7379
7380extern int pthread_create (pthread_t *__restrict __newthread,
7381 const pthread_attr_t *__restrict __attr,
7382 void *(*__start_routine) (void *),
7383 void *__restrict __arg) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 3)));
7384extern void pthread_exit (void *__retval) __attribute__ ((__noreturn__));
7385extern int pthread_join (pthread_t __th, void **__thread_return);
7386extern int pthread_tryjoin_np (pthread_t __th, void **__thread_return) __attribute__ ((__nothrow__ , __leaf__));
7387extern int pthread_timedjoin_np (pthread_t __th, void **__thread_return,
7388 const struct timespec *__abstime);
7389extern int pthread_detach (pthread_t __th) __attribute__ ((__nothrow__ , __leaf__));
7390extern pthread_t pthread_self (void) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
7391extern int pthread_equal (pthread_t __thread1, pthread_t __thread2)
7392 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
7393extern int pthread_attr_init (pthread_attr_t *__attr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7394extern int pthread_attr_destroy (pthread_attr_t *__attr)
7395 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7396extern int pthread_attr_getdetachstate (const pthread_attr_t *__attr,
7397 int *__detachstate)
7398 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
7399extern int pthread_attr_setdetachstate (pthread_attr_t *__attr,
7400 int __detachstate)
7401 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7402extern int pthread_attr_getguardsize (const pthread_attr_t *__attr,
7403 size_t *__guardsize)
7404 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
7405extern int pthread_attr_setguardsize (pthread_attr_t *__attr,
7406 size_t __guardsize)
7407 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7408extern int pthread_attr_getschedparam (const pthread_attr_t *__restrict __attr,
7409 struct sched_param *__restrict __param)
7410 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
7411extern int pthread_attr_setschedparam (pthread_attr_t *__restrict __attr,
7412 const struct sched_param *__restrict
7413 __param) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
7414extern int pthread_attr_getschedpolicy (const pthread_attr_t *__restrict
7415 __attr, int *__restrict __policy)
7416 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
7417extern int pthread_attr_setschedpolicy (pthread_attr_t *__attr, int __policy)
7418 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7419extern int pthread_attr_getinheritsched (const pthread_attr_t *__restrict
7420 __attr, int *__restrict __inherit)
7421 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
7422extern int pthread_attr_setinheritsched (pthread_attr_t *__attr,
7423 int __inherit)
7424 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7425extern int pthread_attr_getscope (const pthread_attr_t *__restrict __attr,
7426 int *__restrict __scope)
7427 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
7428extern int pthread_attr_setscope (pthread_attr_t *__attr, int __scope)
7429 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7430extern int pthread_attr_getstackaddr (const pthread_attr_t *__restrict
7431 __attr, void **__restrict __stackaddr)
7432 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__deprecated__));
7433extern int pthread_attr_setstackaddr (pthread_attr_t *__attr,
7434 void *__stackaddr)
7435 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__));
7436extern int pthread_attr_getstacksize (const pthread_attr_t *__restrict
7437 __attr, size_t *__restrict __stacksize)
7438 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
7439extern int pthread_attr_setstacksize (pthread_attr_t *__attr,
7440 size_t __stacksize)
7441 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7442extern int pthread_attr_getstack (const pthread_attr_t *__restrict __attr,
7443 void **__restrict __stackaddr,
7444 size_t *__restrict __stacksize)
7445 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2, 3)));
7446extern int pthread_attr_setstack (pthread_attr_t *__attr, void *__stackaddr,
7447 size_t __stacksize) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7448extern int pthread_attr_setaffinity_np (pthread_attr_t *__attr,
7449 size_t __cpusetsize,
7450 const cpu_set_t *__cpuset)
7451 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 3)));
7452extern int pthread_attr_getaffinity_np (const pthread_attr_t *__attr,
7453 size_t __cpusetsize,
7454 cpu_set_t *__cpuset)
7455 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 3)));
7456extern int pthread_getattr_default_np (pthread_attr_t *__attr)
7457 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7458extern int pthread_setattr_default_np (const pthread_attr_t *__attr)
7459 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7460extern int pthread_getattr_np (pthread_t __th, pthread_attr_t *__attr)
7461 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
7462extern int pthread_setschedparam (pthread_t __target_thread, int __policy,
7463 const struct sched_param *__param)
7464 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3)));
7465extern int pthread_getschedparam (pthread_t __target_thread,
7466 int *__restrict __policy,
7467 struct sched_param *__restrict __param)
7468 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3)));
7469extern int pthread_setschedprio (pthread_t __target_thread, int __prio)
7470 __attribute__ ((__nothrow__ , __leaf__));
7471extern int pthread_getname_np (pthread_t __target_thread, char *__buf,
7472 size_t __buflen)
7473 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
7474extern int pthread_setname_np (pthread_t __target_thread, const char *__name)
7475 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
7476extern int pthread_getconcurrency (void) __attribute__ ((__nothrow__ , __leaf__));
7477extern int pthread_setconcurrency (int __level) __attribute__ ((__nothrow__ , __leaf__));
7478extern int pthread_yield (void) __attribute__ ((__nothrow__ , __leaf__));
7479extern int pthread_setaffinity_np (pthread_t __th, size_t __cpusetsize,
7480 const cpu_set_t *__cpuset)
7481 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3)));
7482extern int pthread_getaffinity_np (pthread_t __th, size_t __cpusetsize,
7483 cpu_set_t *__cpuset)
7484 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3)));
7485extern int pthread_once (pthread_once_t *__once_control,
7486 void (*__init_routine) (void)) __attribute__ ((__nonnull__ (1, 2)));
7487extern int pthread_setcancelstate (int __state, int *__oldstate);
7488extern int pthread_setcanceltype (int __type, int *__oldtype);
7489extern int pthread_cancel (pthread_t __th);
7490extern void pthread_testcancel (void);
7491typedef struct
7492{
7493 struct
7494 {
7495 __jmp_buf __cancel_jmp_buf;
7496 int __mask_was_saved;
7497 } __cancel_jmp_buf[1];
7498 void *__pad[4];
7499} __pthread_unwind_buf_t __attribute__ ((__aligned__));
7501{
7502 void (*__cancel_routine) (void *);
7503 void *__cancel_arg;
7504 int __do_it;
7505 int __cancel_type;
7506};
7507extern void __pthread_register_cancel (__pthread_unwind_buf_t *__buf)
7508 ;
7509extern void __pthread_unregister_cancel (__pthread_unwind_buf_t *__buf)
7510 ;
7511extern void __pthread_register_cancel_defer (__pthread_unwind_buf_t *__buf)
7512 ;
7513extern void __pthread_unregister_cancel_restore (__pthread_unwind_buf_t *__buf)
7514 ;
7515extern void __pthread_unwind_next (__pthread_unwind_buf_t *__buf)
7516 __attribute__ ((__noreturn__))
7517 __attribute__ ((__weak__))
7518 ;
7519struct __jmp_buf_tag;
7520extern int __sigsetjmp (struct __jmp_buf_tag *__env, int __savemask) __attribute__ ((__nothrow__));
7521extern int pthread_mutex_init (pthread_mutex_t *__mutex,
7522 const pthread_mutexattr_t *__mutexattr)
7523 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7524extern int pthread_mutex_destroy (pthread_mutex_t *__mutex)
7525 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7526extern int pthread_mutex_trylock (pthread_mutex_t *__mutex)
7527 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
7528extern int pthread_mutex_lock (pthread_mutex_t *__mutex)
7529 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
7530extern int pthread_mutex_timedlock (pthread_mutex_t *__restrict __mutex,
7531 const struct timespec *__restrict
7532 __abstime) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
7533extern int pthread_mutex_clocklock (pthread_mutex_t *__restrict __mutex,
7534 clockid_t __clockid,
7535 const struct timespec *__restrict
7536 __abstime) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 3)));
7537extern int pthread_mutex_unlock (pthread_mutex_t *__mutex)
7538 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
7539extern int pthread_mutex_getprioceiling (const pthread_mutex_t *
7540 __restrict __mutex,
7541 int *__restrict __prioceiling)
7542 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
7543extern int pthread_mutex_setprioceiling (pthread_mutex_t *__restrict __mutex,
7544 int __prioceiling,
7545 int *__restrict __old_ceiling)
7546 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 3)));
7547extern int pthread_mutex_consistent (pthread_mutex_t *__mutex)
7548 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7549extern int pthread_mutex_consistent_np (pthread_mutex_t *__mutex)
7550 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7551extern int pthread_mutexattr_init (pthread_mutexattr_t *__attr)
7552 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7553extern int pthread_mutexattr_destroy (pthread_mutexattr_t *__attr)
7554 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7555extern int pthread_mutexattr_getpshared (const pthread_mutexattr_t *
7556 __restrict __attr,
7557 int *__restrict __pshared)
7558 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
7559extern int pthread_mutexattr_setpshared (pthread_mutexattr_t *__attr,
7560 int __pshared)
7561 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7562extern int pthread_mutexattr_gettype (const pthread_mutexattr_t *__restrict
7563 __attr, int *__restrict __kind)
7564 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
7565extern int pthread_mutexattr_settype (pthread_mutexattr_t *__attr, int __kind)
7566 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7567extern int pthread_mutexattr_getprotocol (const pthread_mutexattr_t *
7568 __restrict __attr,
7569 int *__restrict __protocol)
7570 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
7571extern int pthread_mutexattr_setprotocol (pthread_mutexattr_t *__attr,
7572 int __protocol)
7573 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7574extern int pthread_mutexattr_getprioceiling (const pthread_mutexattr_t *
7575 __restrict __attr,
7576 int *__restrict __prioceiling)
7577 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
7578extern int pthread_mutexattr_setprioceiling (pthread_mutexattr_t *__attr,
7579 int __prioceiling)
7580 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7581extern int pthread_mutexattr_getrobust (const pthread_mutexattr_t *__attr,
7582 int *__robustness)
7583 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
7584extern int pthread_mutexattr_getrobust_np (const pthread_mutexattr_t *__attr,
7585 int *__robustness)
7586 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
7587extern int pthread_mutexattr_setrobust (pthread_mutexattr_t *__attr,
7588 int __robustness)
7589 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7590extern int pthread_mutexattr_setrobust_np (pthread_mutexattr_t *__attr,
7591 int __robustness)
7592 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7593extern int pthread_rwlock_init (pthread_rwlock_t *__restrict __rwlock,
7594 const pthread_rwlockattr_t *__restrict
7595 __attr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7596extern int pthread_rwlock_destroy (pthread_rwlock_t *__rwlock)
7597 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7598extern int pthread_rwlock_rdlock (pthread_rwlock_t *__rwlock)
7599 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
7600extern int pthread_rwlock_tryrdlock (pthread_rwlock_t *__rwlock)
7601 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
7602extern int pthread_rwlock_timedrdlock (pthread_rwlock_t *__restrict __rwlock,
7603 const struct timespec *__restrict
7604 __abstime) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
7605extern int pthread_rwlock_clockrdlock (pthread_rwlock_t *__restrict __rwlock,
7606 clockid_t __clockid,
7607 const struct timespec *__restrict
7608 __abstime) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 3)));
7609extern int pthread_rwlock_wrlock (pthread_rwlock_t *__rwlock)
7610 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
7611extern int pthread_rwlock_trywrlock (pthread_rwlock_t *__rwlock)
7612 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
7613extern int pthread_rwlock_timedwrlock (pthread_rwlock_t *__restrict __rwlock,
7614 const struct timespec *__restrict
7615 __abstime) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
7616extern int pthread_rwlock_clockwrlock (pthread_rwlock_t *__restrict __rwlock,
7617 clockid_t __clockid,
7618 const struct timespec *__restrict
7619 __abstime) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 3)));
7620extern int pthread_rwlock_unlock (pthread_rwlock_t *__rwlock)
7621 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
7622extern int pthread_rwlockattr_init (pthread_rwlockattr_t *__attr)
7623 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7624extern int pthread_rwlockattr_destroy (pthread_rwlockattr_t *__attr)
7625 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7626extern int pthread_rwlockattr_getpshared (const pthread_rwlockattr_t *
7627 __restrict __attr,
7628 int *__restrict __pshared)
7629 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
7630extern int pthread_rwlockattr_setpshared (pthread_rwlockattr_t *__attr,
7631 int __pshared)
7632 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7633extern int pthread_rwlockattr_getkind_np (const pthread_rwlockattr_t *
7634 __restrict __attr,
7635 int *__restrict __pref)
7636 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
7637extern int pthread_rwlockattr_setkind_np (pthread_rwlockattr_t *__attr,
7638 int __pref) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7639extern int pthread_cond_init (pthread_cond_t *__restrict __cond,
7640 const pthread_condattr_t *__restrict __cond_attr)
7641 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7642extern int pthread_cond_destroy (pthread_cond_t *__cond)
7643 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7644extern int pthread_cond_signal (pthread_cond_t *__cond)
7645 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
7646extern int pthread_cond_broadcast (pthread_cond_t *__cond)
7647 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
7648extern int pthread_cond_wait (pthread_cond_t *__restrict __cond,
7649 pthread_mutex_t *__restrict __mutex)
7650 __attribute__ ((__nonnull__ (1, 2)));
7651extern int pthread_cond_timedwait (pthread_cond_t *__restrict __cond,
7652 pthread_mutex_t *__restrict __mutex,
7653 const struct timespec *__restrict __abstime)
7654 __attribute__ ((__nonnull__ (1, 2, 3)));
7655extern int pthread_cond_clockwait (pthread_cond_t *__restrict __cond,
7656 pthread_mutex_t *__restrict __mutex,
7657 __clockid_t __clock_id,
7658 const struct timespec *__restrict __abstime)
7659 __attribute__ ((__nonnull__ (1, 2, 4)));
7660extern int pthread_condattr_init (pthread_condattr_t *__attr)
7661 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7662extern int pthread_condattr_destroy (pthread_condattr_t *__attr)
7663 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7664extern int pthread_condattr_getpshared (const pthread_condattr_t *
7665 __restrict __attr,
7666 int *__restrict __pshared)
7667 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
7668extern int pthread_condattr_setpshared (pthread_condattr_t *__attr,
7669 int __pshared) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7670extern int pthread_condattr_getclock (const pthread_condattr_t *
7671 __restrict __attr,
7672 __clockid_t *__restrict __clock_id)
7673 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
7674extern int pthread_condattr_setclock (pthread_condattr_t *__attr,
7675 __clockid_t __clock_id)
7676 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7677extern int pthread_spin_init (pthread_spinlock_t *__lock, int __pshared)
7678 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7679extern int pthread_spin_destroy (pthread_spinlock_t *__lock)
7680 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7681extern int pthread_spin_lock (pthread_spinlock_t *__lock)
7682 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
7683extern int pthread_spin_trylock (pthread_spinlock_t *__lock)
7684 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
7685extern int pthread_spin_unlock (pthread_spinlock_t *__lock)
7686 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
7687extern int pthread_barrier_init (pthread_barrier_t *__restrict __barrier,
7688 const pthread_barrierattr_t *__restrict
7689 __attr, unsigned int __count)
7690 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7691extern int pthread_barrier_destroy (pthread_barrier_t *__barrier)
7692 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7693extern int pthread_barrier_wait (pthread_barrier_t *__barrier)
7694 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
7695extern int pthread_barrierattr_init (pthread_barrierattr_t *__attr)
7696 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7697extern int pthread_barrierattr_destroy (pthread_barrierattr_t *__attr)
7698 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7699extern int pthread_barrierattr_getpshared (const pthread_barrierattr_t *
7700 __restrict __attr,
7701 int *__restrict __pshared)
7702 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
7703extern int pthread_barrierattr_setpshared (pthread_barrierattr_t *__attr,
7704 int __pshared)
7705 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7706extern int pthread_key_create (pthread_key_t *__key,
7707 void (*__destr_function) (void *))
7708 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7709extern int pthread_key_delete (pthread_key_t __key) __attribute__ ((__nothrow__ , __leaf__));
7710extern void *pthread_getspecific (pthread_key_t __key) __attribute__ ((__nothrow__ , __leaf__));
7711extern int pthread_setspecific (pthread_key_t __key,
7712 const void *__pointer) __attribute__ ((__nothrow__ , __leaf__)) ;
7713extern int pthread_getcpuclockid (pthread_t __thread_id,
7714 __clockid_t *__clock_id)
7715 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
7716extern int pthread_atfork (void (*__prepare) (void),
7717 void (*__parent) (void),
7718 void (*__child) (void)) __attribute__ ((__nothrow__ , __leaf__));
7719extern __inline __attribute__ ((__gnu_inline__)) int
7720__attribute__ ((__nothrow__ , __leaf__)) pthread_equal (pthread_t __thread1, pthread_t __thread2)
7721{
7722 return __thread1 == __thread2;
7723}
7724
7725typedef pthread_t rb_nativethread_id_t;
7727
7728
7729rb_nativethread_id_t rb_nativethread_self();
7734
7735
7737typedef struct native_thread_data_struct {
7738 union {
7739 struct list_node ubf;
7740 struct list_node gvl;
7741 } node;
7742 union
7743 {
7746 } cond;
7748typedef struct rb_global_vm_lock_struct {
7749 const struct rb_thread_struct *owner;
7751 struct list_head waitq;
7752 const struct rb_thread_struct *timer;
7753 int timer_err;
7754 rb_nativethread_cond_t switch_cond;
7755 rb_nativethread_cond_t switch_wait_cond;
7756 int need_yield;
7757 int wait_yield;
7759
7760struct __jmp_buf_tag
7761 {
7762 __jmp_buf __jmpbuf;
7763 int __mask_was_saved;
7764 __sigset_t __saved_mask;
7765 };
7766typedef struct __jmp_buf_tag jmp_buf[1];
7767extern int setjmp (jmp_buf __env) __attribute__ ((__nothrow__));
7768extern int __sigsetjmp (struct __jmp_buf_tag __env[1], int __savemask) __attribute__ ((__nothrow__));
7769extern int _setjmp (struct __jmp_buf_tag __env[1]) __attribute__ ((__nothrow__));
7770extern void longjmp (struct __jmp_buf_tag __env[1], int __val)
7771 __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__));
7772extern void _longjmp (struct __jmp_buf_tag __env[1], int __val)
7773 __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__));
7774typedef struct __jmp_buf_tag sigjmp_buf[1];
7775extern void siglongjmp (sigjmp_buf __env, int __val)
7776 __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__));
7777extern void longjmp (struct __jmp_buf_tag __env[1], int __val) __asm__ ("" "__longjmp_chk") __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__));
7778extern void _longjmp (struct __jmp_buf_tag __env[1], int __val) __asm__ ("" "__longjmp_chk") __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__));
7779extern void siglongjmp (struct __jmp_buf_tag __env[1], int __val) __asm__ ("" "__longjmp_chk") __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__));
7780
7781
7782typedef __sig_atomic_t sig_atomic_t;
7783union sigval
7784{
7785 int sival_int;
7786 void *sival_ptr;
7787};
7788typedef union sigval __sigval_t;
7789typedef struct
7790 {
7791 int si_signo;
7792 int si_errno;
7793 int si_code;
7794 int __pad0;
7795 union
7796 {
7797 int _pad[((128 / sizeof (int)) - 4)];
7798 struct
7799 {
7800 __pid_t si_pid;
7801 __uid_t si_uid;
7802 } _kill;
7803 struct
7804 {
7805 int si_tid;
7806 int si_overrun;
7807 __sigval_t si_sigval;
7808 } _timer;
7809 struct
7810 {
7811 __pid_t si_pid;
7812 __uid_t si_uid;
7813 __sigval_t si_sigval;
7814 } _rt;
7815 struct
7816 {
7817 __pid_t si_pid;
7818 __uid_t si_uid;
7819 int si_status;
7820 __clock_t si_utime;
7821 __clock_t si_stime;
7822 } _sigchld;
7823 struct
7824 {
7825 void *si_addr;
7826
7827 short int si_addr_lsb;
7828 union
7829 {
7830 struct
7831 {
7832 void *_lower;
7833 void *_upper;
7834 } _addr_bnd;
7835 __uint32_t _pkey;
7836 } _bounds;
7837 } _sigfault;
7838 struct
7839 {
7840 long int si_band;
7841 int si_fd;
7842 } _sigpoll;
7843 struct
7844 {
7845 void *_call_addr;
7846 int _syscall;
7847 unsigned int _arch;
7848 } _sigsys;
7849 } _sifields;
7850 } siginfo_t ;
7851enum
7852{
7853 SI_ASYNCNL = -60,
7854 SI_DETHREAD = -7,
7855 SI_TKILL,
7856 SI_SIGIO,
7857 SI_ASYNCIO,
7858 SI_MESGQ,
7859 SI_TIMER,
7860 SI_QUEUE,
7861 SI_USER,
7862 SI_KERNEL = 0x80
7863};
7864enum
7865{
7866 ILL_ILLOPC = 1,
7867 ILL_ILLOPN,
7868 ILL_ILLADR,
7869 ILL_ILLTRP,
7870 ILL_PRVOPC,
7871 ILL_PRVREG,
7872 ILL_COPROC,
7873 ILL_BADSTK,
7874 ILL_BADIADDR
7875};
7876enum
7877{
7878 FPE_INTDIV = 1,
7879 FPE_INTOVF,
7880 FPE_FLTDIV,
7881 FPE_FLTOVF,
7882 FPE_FLTUND,
7883 FPE_FLTRES,
7884 FPE_FLTINV,
7885 FPE_FLTSUB,
7886 FPE_FLTUNK = 14,
7887 FPE_CONDTRAP
7888};
7889enum
7890{
7891 SEGV_MAPERR = 1,
7892 SEGV_ACCERR,
7893 SEGV_BNDERR,
7894 SEGV_PKUERR,
7895 SEGV_ACCADI,
7896 SEGV_ADIDERR,
7897 SEGV_ADIPERR
7898};
7899enum
7900{
7901 BUS_ADRALN = 1,
7902 BUS_ADRERR,
7903 BUS_OBJERR,
7904 BUS_MCEERR_AR,
7905 BUS_MCEERR_AO
7906};
7907enum
7908{
7909 TRAP_BRKPT = 1,
7910 TRAP_TRACE,
7911 TRAP_BRANCH,
7912 TRAP_HWBKPT,
7913 TRAP_UNK
7914};
7915enum
7916{
7917 CLD_EXITED = 1,
7918 CLD_KILLED,
7919 CLD_DUMPED,
7920 CLD_TRAPPED,
7921 CLD_STOPPED,
7922 CLD_CONTINUED
7923};
7924enum
7925{
7926 POLL_IN = 1,
7927 POLL_OUT,
7928 POLL_MSG,
7929 POLL_ERR,
7930 POLL_PRI,
7931 POLL_HUP
7932};
7933typedef __sigval_t sigval_t;
7934typedef struct sigevent
7935 {
7936 __sigval_t sigev_value;
7937 int sigev_signo;
7938 int sigev_notify;
7939 union
7940 {
7941 int _pad[((64 / sizeof (int)) - 4)];
7942 __pid_t _tid;
7943 struct
7944 {
7945 void (*_function) (__sigval_t);
7946 pthread_attr_t *_attribute;
7947 } _sigev_thread;
7948 } _sigev_un;
7949 } sigevent_t;
7950enum
7951{
7952 SIGEV_SIGNAL = 0,
7953 SIGEV_NONE,
7954 SIGEV_THREAD,
7955 SIGEV_THREAD_ID = 4
7956};
7957typedef void (*__sighandler_t) (int);
7958extern __sighandler_t __sysv_signal (int __sig, __sighandler_t __handler)
7959 __attribute__ ((__nothrow__ , __leaf__));
7960extern __sighandler_t sysv_signal (int __sig, __sighandler_t __handler)
7961 __attribute__ ((__nothrow__ , __leaf__));
7962extern __sighandler_t signal (int __sig, __sighandler_t __handler)
7963 __attribute__ ((__nothrow__ , __leaf__));
7964extern int kill (__pid_t __pid, int __sig) __attribute__ ((__nothrow__ , __leaf__));
7965extern int killpg (__pid_t __pgrp, int __sig) __attribute__ ((__nothrow__ , __leaf__));
7966extern int raise (int __sig) __attribute__ ((__nothrow__ , __leaf__));
7967extern __sighandler_t ssignal (int __sig, __sighandler_t __handler)
7968 __attribute__ ((__nothrow__ , __leaf__));
7969extern int gsignal (int __sig) __attribute__ ((__nothrow__ , __leaf__));
7970extern void psignal (int __sig, const char *__s);
7971extern void psiginfo (const siginfo_t *__pinfo, const char *__s);
7972extern int sigpause (int __sig) __asm__ ("__xpg_sigpause");
7973extern int sigblock (int __mask) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__deprecated__));
7974extern int sigsetmask (int __mask) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__deprecated__));
7975extern int siggetmask (void) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__deprecated__));
7976typedef __sighandler_t sighandler_t;
7977typedef __sighandler_t sig_t;
7978extern int sigemptyset (sigset_t *__set) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7979extern int sigfillset (sigset_t *__set) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7980extern int sigaddset (sigset_t *__set, int __signo) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7981extern int sigdelset (sigset_t *__set, int __signo) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7982extern int sigismember (const sigset_t *__set, int __signo)
7983 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7984extern int sigisemptyset (const sigset_t *__set) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
7985extern int sigandset (sigset_t *__set, const sigset_t *__left,
7986 const sigset_t *__right) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2, 3)));
7987extern int sigorset (sigset_t *__set, const sigset_t *__left,
7988 const sigset_t *__right) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2, 3)));
7989struct sigaction
7990 {
7991 union
7992 {
7993 __sighandler_t sa_handler;
7994 void (*sa_sigaction) (int, siginfo_t *, void *);
7995 }
7996 __sigaction_handler;
7997 __sigset_t sa_mask;
7998 int sa_flags;
7999 void (*sa_restorer) (void);
8000 };
8001extern int sigprocmask (int __how, const sigset_t *__restrict __set,
8002 sigset_t *__restrict __oset) __attribute__ ((__nothrow__ , __leaf__));
8003extern int sigsuspend (const sigset_t *__set) __attribute__ ((__nonnull__ (1)));
8004extern int sigaction (int __sig, const struct sigaction *__restrict __act,
8005 struct sigaction *__restrict __oact) __attribute__ ((__nothrow__ , __leaf__));
8006extern int sigpending (sigset_t *__set) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
8007extern int sigwait (const sigset_t *__restrict __set, int *__restrict __sig)
8008 __attribute__ ((__nonnull__ (1, 2)));
8009extern int sigwaitinfo (const sigset_t *__restrict __set,
8010 siginfo_t *__restrict __info) __attribute__ ((__nonnull__ (1)));
8011extern int sigtimedwait (const sigset_t *__restrict __set,
8012 siginfo_t *__restrict __info,
8013 const struct timespec *__restrict __timeout)
8014 __attribute__ ((__nonnull__ (1)));
8015extern int sigqueue (__pid_t __pid, int __sig, const union sigval __val)
8016 __attribute__ ((__nothrow__ , __leaf__));
8017extern const char *const _sys_siglist[(64 + 1)];
8018extern const char *const sys_siglist[(64 + 1)];
8019struct _fpx_sw_bytes
8020{
8021 __uint32_t magic1;
8022 __uint32_t extended_size;
8023 __uint64_t xstate_bv;
8024 __uint32_t xstate_size;
8025 __uint32_t __glibc_reserved1[7];
8026};
8027struct _fpreg
8028{
8029 unsigned short significand[4];
8030 unsigned short exponent;
8031};
8032struct _fpxreg
8033{
8034 unsigned short significand[4];
8035 unsigned short exponent;
8036 unsigned short __glibc_reserved1[3];
8037};
8038struct _xmmreg
8039{
8040 __uint32_t element[4];
8041};
8042struct _fpstate
8043{
8044 __uint16_t cwd;
8045 __uint16_t swd;
8046 __uint16_t ftw;
8047 __uint16_t fop;
8048 __uint64_t rip;
8049 __uint64_t rdp;
8050 __uint32_t mxcsr;
8051 __uint32_t mxcr_mask;
8052 struct _fpxreg _st[8];
8053 struct _xmmreg _xmm[16];
8054 __uint32_t __glibc_reserved1[24];
8055};
8056struct sigcontext
8057{
8058 __uint64_t r8;
8059 __uint64_t r9;
8060 __uint64_t r10;
8061 __uint64_t r11;
8062 __uint64_t r12;
8063 __uint64_t r13;
8064 __uint64_t r14;
8065 __uint64_t r15;
8066 __uint64_t rdi;
8067 __uint64_t rsi;
8068 __uint64_t rbp;
8069 __uint64_t rbx;
8070 __uint64_t rdx;
8071 __uint64_t rax;
8072 __uint64_t rcx;
8073 __uint64_t rsp;
8074 __uint64_t rip;
8075 __uint64_t eflags;
8076 unsigned short cs;
8077 unsigned short gs;
8078 unsigned short fs;
8079 unsigned short __pad0;
8080 __uint64_t err;
8081 __uint64_t trapno;
8082 __uint64_t oldmask;
8083 __uint64_t cr2;
8084 __extension__ union
8085 {
8086 struct _fpstate * fpstate;
8087 __uint64_t __fpstate_word;
8088 };
8089 __uint64_t __reserved1 [8];
8090};
8091struct _xsave_hdr
8092{
8093 __uint64_t xstate_bv;
8094 __uint64_t __glibc_reserved1[2];
8095 __uint64_t __glibc_reserved2[5];
8096};
8097struct _ymmh_state
8098{
8099 __uint32_t ymmh_space[64];
8100};
8101struct _xstate
8102{
8103 struct _fpstate fpstate;
8104 struct _xsave_hdr xstate_hdr;
8105 struct _ymmh_state ymmh;
8106};
8107extern int sigreturn (struct sigcontext *__scp) __attribute__ ((__nothrow__ , __leaf__));
8108typedef struct
8109 {
8110 void *ss_sp;
8111 int ss_flags;
8112 size_t ss_size;
8113 } stack_t;
8114__extension__ typedef long long int greg_t;
8115typedef greg_t gregset_t[23];
8116enum
8117{
8118 REG_R8 = 0,
8119 REG_R9,
8120 REG_R10,
8121 REG_R11,
8122 REG_R12,
8123 REG_R13,
8124 REG_R14,
8125 REG_R15,
8126 REG_RDI,
8127 REG_RSI,
8128 REG_RBP,
8129 REG_RBX,
8130 REG_RDX,
8131 REG_RAX,
8132 REG_RCX,
8133 REG_RSP,
8134 REG_RIP,
8135 REG_EFL,
8136 REG_CSGSFS,
8137 REG_ERR,
8138 REG_TRAPNO,
8139 REG_OLDMASK,
8140 REG_CR2
8141};
8142struct _libc_fpxreg
8143{
8144 unsigned short int significand[4];
8145 unsigned short int exponent;
8146 unsigned short int __glibc_reserved1[3];
8147};
8148struct _libc_xmmreg
8149{
8150 __uint32_t element[4];
8151};
8152struct _libc_fpstate
8153{
8154 __uint16_t cwd;
8155 __uint16_t swd;
8156 __uint16_t ftw;
8157 __uint16_t fop;
8158 __uint64_t rip;
8159 __uint64_t rdp;
8160 __uint32_t mxcsr;
8161 __uint32_t mxcr_mask;
8162 struct _libc_fpxreg _st[8];
8163 struct _libc_xmmreg _xmm[16];
8164 __uint32_t __glibc_reserved1[24];
8165};
8166typedef struct _libc_fpstate *fpregset_t;
8167typedef struct
8168 {
8169 gregset_t gregs;
8170 fpregset_t fpregs;
8171 __extension__ unsigned long long __reserved1 [8];
8172} mcontext_t;
8173typedef struct ucontext_t
8174 {
8175 unsigned long int uc_flags;
8176 struct ucontext_t *uc_link;
8177 stack_t uc_stack;
8178 mcontext_t uc_mcontext;
8179 sigset_t uc_sigmask;
8180 struct _libc_fpstate __fpregs_mem;
8181 __extension__ unsigned long long int __ssp[4];
8182 } ucontext_t;
8183extern int siginterrupt (int __sig, int __interrupt) __attribute__ ((__nothrow__ , __leaf__));
8184enum
8185{
8186 SS_ONSTACK = 1,
8187 SS_DISABLE
8188};
8189extern int sigaltstack (const stack_t *__restrict __ss,
8190 stack_t *__restrict __oss) __attribute__ ((__nothrow__ , __leaf__));
8191struct sigstack
8192 {
8193 void *ss_sp;
8194 int ss_onstack;
8195 };
8196extern int sigstack (struct sigstack *__ss, struct sigstack *__oss)
8197 __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__deprecated__));
8198extern int sighold (int __sig) __attribute__ ((__nothrow__ , __leaf__));
8199extern int sigrelse (int __sig) __attribute__ ((__nothrow__ , __leaf__));
8200extern int sigignore (int __sig) __attribute__ ((__nothrow__ , __leaf__));
8201extern __sighandler_t sigset (int __sig, __sighandler_t __disp) __attribute__ ((__nothrow__ , __leaf__));
8202extern int pthread_sigmask (int __how,
8203 const __sigset_t *__restrict __newmask,
8204 __sigset_t *__restrict __oldmask)__attribute__ ((__nothrow__ , __leaf__));
8205extern int pthread_kill (pthread_t __threadid, int __signo) __attribute__ ((__nothrow__ , __leaf__));
8206extern int pthread_sigqueue (pthread_t __threadid, int __signo,
8207 const union sigval __value) __attribute__ ((__nothrow__ , __leaf__));
8208extern int __libc_current_sigrtmin (void) __attribute__ ((__nothrow__ , __leaf__));
8209extern int __libc_current_sigrtmax (void) __attribute__ ((__nothrow__ , __leaf__));
8210extern int tgkill (__pid_t __tgid, __pid_t __tid, int __signal);
8211
8212void *rb_register_sigaltstack(void);
8213void rb_vm_encoded_insn_data_table_init(void);
8214typedef unsigned long rb_num_t;
8215typedef signed long rb_snum_t;
8216enum ruby_tag_type {
8217 RUBY_TAG_NONE = 0x0,
8218 RUBY_TAG_RETURN = 0x1,
8219 RUBY_TAG_BREAK = 0x2,
8220 RUBY_TAG_NEXT = 0x3,
8221 RUBY_TAG_RETRY = 0x4,
8222 RUBY_TAG_REDO = 0x5,
8223 RUBY_TAG_RAISE = 0x6,
8224 RUBY_TAG_THROW = 0x7,
8225 RUBY_TAG_FATAL = 0x8,
8226 RUBY_TAG_MASK = 0xf
8227};
8228enum ruby_vm_throw_flags {
8229 VM_THROW_NO_ESCAPE_FLAG = 0x8000,
8230 VM_THROW_STATE_MASK = 0xff
8231};
8232struct rb_thread_struct;
8236 rb_serial_t ic_serial;
8237 const rb_cref_t *ic_cref;
8238 VALUE value;
8239};
8241 rb_serial_t ic_serial;
8242 size_t index;
8243};
8245 struct {
8246 struct rb_thread_struct *running_thread;
8247 VALUE value;
8248 } once;
8249 struct iseq_inline_cache_entry cache;
8250 struct iseq_inline_iv_cache_entry iv_cache;
8251};
8252struct rb_call_info_kw_arg {
8253 int keyword_len;
8254 VALUE keywords[1];
8255};
8257 struct rb_call_info ci;
8258 struct rb_call_info_kw_arg *kw_arg;
8259};
8260struct rb_calling_info {
8261 VALUE block_handler;
8262 VALUE recv;
8263 int argc;
8264 int kw_splat;
8265};
8267 struct rb_call_cache cc;
8268 struct rb_call_info_with_kwarg ci_kw;
8269};
8271typedef VALUE (*vm_call_handler)(struct rb_execution_context_struct *ec, struct rb_control_frame_struct *cfp, struct rb_calling_info *calling, struct rb_call_data *cd);
8272typedef struct rb_iseq_location_struct {
8273 VALUE pathobj;
8274 VALUE base_label;
8275 VALUE label;
8276 VALUE first_lineno;
8277 int node_id;
8278 rb_code_location_t code_location;
8280static inline VALUE
8281pathobj_path(VALUE pathobj)
8282{
8283 if (( ((RUBY_T_STRING) == RUBY_T_FIXNUM) ? (((int)(long)(pathobj))&RUBY_FIXNUM_FLAG) : ((RUBY_T_STRING) == RUBY_T_TRUE) ? ((pathobj) == ((VALUE)RUBY_Qtrue)) : ((RUBY_T_STRING) == RUBY_T_FALSE) ? ((pathobj) == ((VALUE)RUBY_Qfalse)) : ((RUBY_T_STRING) == RUBY_T_NIL) ? ((pathobj) == ((VALUE)RUBY_Qnil)) : ((RUBY_T_STRING) == RUBY_T_UNDEF) ? ((pathobj) == ((VALUE)RUBY_Qundef)) : ((RUBY_T_STRING) == RUBY_T_SYMBOL) ? ((((VALUE)(pathobj)&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG)||(!(((VALUE)(pathobj) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(pathobj) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(pathobj))->flags & RUBY_T_MASK) == (RUBY_T_SYMBOL))) : ((RUBY_T_STRING) == RUBY_T_FLOAT) ? ( ((((int)(long)(pathobj))&RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG) || (!(((VALUE)(pathobj) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(pathobj) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(pathobj))->flags & RUBY_T_MASK) == RUBY_T_FLOAT)) : (!(((VALUE)(pathobj) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(pathobj) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(pathobj))->flags & RUBY_T_MASK) == (RUBY_T_STRING)))) {
8284 return pathobj;
8285 }
8286 else {
8287 ((void)0);
8288 return (rb_array_const_ptr_transient(pathobj)[0]);
8289 }
8290}
8291static inline VALUE
8292pathobj_realpath(VALUE pathobj)
8293{
8294 if (( ((RUBY_T_STRING) == RUBY_T_FIXNUM) ? (((int)(long)(pathobj))&RUBY_FIXNUM_FLAG) : ((RUBY_T_STRING) == RUBY_T_TRUE) ? ((pathobj) == ((VALUE)RUBY_Qtrue)) : ((RUBY_T_STRING) == RUBY_T_FALSE) ? ((pathobj) == ((VALUE)RUBY_Qfalse)) : ((RUBY_T_STRING) == RUBY_T_NIL) ? ((pathobj) == ((VALUE)RUBY_Qnil)) : ((RUBY_T_STRING) == RUBY_T_UNDEF) ? ((pathobj) == ((VALUE)RUBY_Qundef)) : ((RUBY_T_STRING) == RUBY_T_SYMBOL) ? ((((VALUE)(pathobj)&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG)||(!(((VALUE)(pathobj) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(pathobj) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(pathobj))->flags & RUBY_T_MASK) == (RUBY_T_SYMBOL))) : ((RUBY_T_STRING) == RUBY_T_FLOAT) ? ( ((((int)(long)(pathobj))&RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG) || (!(((VALUE)(pathobj) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(pathobj) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(pathobj))->flags & RUBY_T_MASK) == RUBY_T_FLOAT)) : (!(((VALUE)(pathobj) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(pathobj) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(pathobj))->flags & RUBY_T_MASK) == (RUBY_T_STRING)))) {
8295 return pathobj;
8296 }
8297 else {
8298 ((void)0);
8299 return (rb_array_const_ptr_transient(pathobj)[1]);
8300 }
8301}
8302struct rb_mjit_unit;
8303struct rb_iseq_constant_body {
8304 enum iseq_type {
8305 ISEQ_TYPE_TOP,
8306 ISEQ_TYPE_METHOD,
8307 ISEQ_TYPE_BLOCK,
8308 ISEQ_TYPE_CLASS,
8309 ISEQ_TYPE_RESCUE,
8310 ISEQ_TYPE_ENSURE,
8311 ISEQ_TYPE_EVAL,
8312 ISEQ_TYPE_MAIN,
8313 ISEQ_TYPE_PLAIN
8314 } type;
8315 unsigned int iseq_size;
8316 VALUE *iseq_encoded;
8317 struct {
8318 struct {
8319 unsigned int has_lead : 1;
8320 unsigned int has_opt : 1;
8321 unsigned int has_rest : 1;
8322 unsigned int has_post : 1;
8323 unsigned int has_kw : 1;
8324 unsigned int has_kwrest : 1;
8325 unsigned int has_block : 1;
8326 unsigned int ambiguous_param0 : 1;
8327 unsigned int accepts_no_kwarg : 1;
8328 unsigned int ruby2_keywords: 1;
8329 } flags;
8330 unsigned int size;
8331 int lead_num;
8332 int opt_num;
8333 int rest_start;
8334 int post_start;
8335 int post_num;
8336 int block_start;
8337 const VALUE *opt_table;
8338 const struct rb_iseq_param_keyword {
8339 int num;
8340 int required_num;
8341 int bits_start;
8342 int rest_start;
8343 const ID *table;
8344 VALUE *default_values;
8345 } *keyword;
8346 } param;
8347 rb_iseq_location_t location;
8348 struct iseq_insn_info {
8349 const struct iseq_insn_info_entry *body;
8350 unsigned int *positions;
8351 unsigned int size;
8353 } insns_info;
8354 const ID *local_table;
8355 struct iseq_catch_table *catch_table;
8356 const struct rb_iseq_struct *parent_iseq;
8357 struct rb_iseq_struct *local_iseq;
8358 union iseq_inline_storage_entry *is_entries;
8359 struct rb_call_data *call_data;
8360 struct {
8361 rb_snum_t flip_count;
8362 VALUE coverage;
8363 VALUE pc2branchindex;
8364 VALUE *original_iseq;
8365 } variable;
8366 unsigned int local_table_size;
8367 unsigned int is_size;
8368 unsigned int ci_size;
8369 unsigned int ci_kw_size;
8370 unsigned int stack_max;
8371 char catch_except_p;
8372 VALUE (*jit_func)(struct rb_execution_context_struct *,
8373 struct rb_control_frame_struct *);
8374 long unsigned total_calls;
8375 struct rb_mjit_unit *jit_unit;
8376 uintptr_t iseq_unique_id;
8377};
8378struct rb_iseq_struct {
8379 VALUE flags;
8380 VALUE wrapper;
8381 struct rb_iseq_constant_body *body;
8382 union {
8383 struct iseq_compile_data *compile_data;
8384 struct {
8385 VALUE obj;
8386 int index;
8387 } loader;
8388 struct {
8389 struct rb_hook_list_struct *local_hooks;
8390 rb_event_flag_t global_trace_events;
8391 } exec;
8392 } aux;
8393};
8394static inline const rb_iseq_t *
8395rb_iseq_check(const rb_iseq_t *iseq)
8396{
8397 return iseq;
8398}
8399static inline const rb_iseq_t *
8400def_iseq_ptr(rb_method_definition_t *def)
8401{
8402 return rb_iseq_check(def->body.iseq.iseqptr);
8403}
8404enum ruby_special_exceptions {
8405 ruby_error_reenter,
8406 ruby_error_nomemory,
8407 ruby_error_sysstack,
8408 ruby_error_stackfatal,
8409 ruby_error_stream_closed,
8410 ruby_special_error_count
8411};
8412enum ruby_basic_operators {
8413 BOP_PLUS,
8414 BOP_MINUS,
8415 BOP_MULT,
8416 BOP_DIV,
8417 BOP_MOD,
8418 BOP_EQ,
8419 BOP_EQQ,
8420 BOP_LT,
8421 BOP_LE,
8422 BOP_LTLT,
8423 BOP_AREF,
8424 BOP_ASET,
8425 BOP_LENGTH,
8426 BOP_SIZE,
8427 BOP_EMPTY_P,
8428 BOP_NIL_P,
8429 BOP_SUCC,
8430 BOP_GT,
8431 BOP_GE,
8432 BOP_NOT,
8433 BOP_NEQ,
8434 BOP_MATCH,
8435 BOP_FREEZE,
8436 BOP_UMINUS,
8437 BOP_MAX,
8438 BOP_MIN,
8439 BOP_CALL,
8440 BOP_AND,
8441 BOP_OR,
8442 BOP_LAST_
8443};
8444struct rb_vm_struct;
8445typedef void rb_vm_at_exit_func(struct rb_vm_struct*);
8446typedef struct rb_at_exit_list {
8447 rb_vm_at_exit_func *func;
8448 struct rb_at_exit_list *next;
8450struct rb_objspace;
8451struct rb_objspace *rb_objspace_alloc(void);
8452void rb_objspace_free(struct rb_objspace *);
8453void rb_objspace_call_finalizer(struct rb_objspace *);
8454typedef struct rb_hook_list_struct {
8455 struct rb_event_hook_struct *hooks;
8456 rb_event_flag_t events;
8457 unsigned int need_clean;
8458 unsigned int running;
8460typedef const struct rb_builtin_function *RB_BUILTIN;
8461typedef struct rb_vm_struct {
8462 VALUE self;
8464 struct rb_thread_struct *main_thread;
8465 const struct rb_thread_struct *running_thread;
8466 void *main_altstack;
8467 rb_serial_t fork_gen;
8468 rb_nativethread_lock_t waitpid_lock;
8469 struct list_head waiting_pids;
8470 struct list_head waiting_grps;
8471 struct list_head waiting_fds;
8472 struct list_head living_threads;
8473 VALUE thgroup_default;
8474 int living_thread_num;
8475 volatile int ubf_async_safe;
8476 unsigned int running: 1;
8477 unsigned int thread_abort_on_exception: 1;
8478 unsigned int thread_report_on_exception: 1;
8479 unsigned int safe_level_: 1;
8480 int sleeper;
8481 VALUE mark_object_ary;
8482 const VALUE special_exceptions[ruby_special_error_count];
8483 VALUE top_self;
8484 VALUE load_path;
8485 VALUE load_path_snapshot;
8486 VALUE load_path_check_cache;
8487 VALUE expanded_load_path;
8488 VALUE loaded_features;
8489 VALUE loaded_features_snapshot;
8490 struct st_table *loaded_features_index;
8491 struct st_table *loading_table;
8492 struct {
8493 VALUE cmd[(64 + 1)];
8494 } trap_list;
8495 rb_hook_list_t global_hooks;
8496 struct st_table *ensure_rollback_table;
8497 struct rb_postponed_job_struct *postponed_job_buffer;
8498 int postponed_job_index;
8499 int src_encoding_index;
8500 struct list_head workqueue;
8501 rb_nativethread_lock_t workqueue_lock;
8502 VALUE verbose, debug, orig_progname, progname;
8503 VALUE coverages;
8504 int coverage_mode;
8505 st_table * defined_module_hash;
8506 struct rb_objspace *objspace;
8507 rb_at_exit_list *at_exit;
8508 VALUE *defined_strings;
8509 st_table *frozen_strings;
8510 const struct rb_builtin_function *builtin_function_table;
8511 int builtin_inline_index;
8512 struct {
8513 size_t thread_vm_stack_size;
8514 size_t thread_machine_stack_size;
8515 size_t fiber_vm_stack_size;
8516 size_t fiber_machine_stack_size;
8517 } default_params;
8518 short redefined_flag[BOP_LAST_];
8519} rb_vm_t;
8520struct rb_captured_block {
8521 VALUE self;
8522 const VALUE *ep;
8523 union {
8524 const rb_iseq_t *iseq;
8525 const struct vm_ifunc *ifunc;
8526 VALUE val;
8527 } code;
8528};
8529enum rb_block_handler_type {
8530 block_handler_type_iseq,
8531 block_handler_type_ifunc,
8532 block_handler_type_symbol,
8533 block_handler_type_proc
8534};
8535enum rb_block_type {
8536 block_type_iseq,
8537 block_type_ifunc,
8538 block_type_symbol,
8539 block_type_proc
8540};
8541struct rb_block {
8542 union {
8543 struct rb_captured_block captured;
8544 VALUE symbol;
8545 VALUE proc;
8546 } as;
8547 enum rb_block_type type;
8548};
8549typedef struct rb_control_frame_struct {
8550 const VALUE *pc;
8551 VALUE *sp;
8552 const rb_iseq_t *iseq;
8553 VALUE self;
8554 const VALUE *ep;
8555 const void *block_code;
8556 VALUE *__bp__;
8558extern const rb_data_type_t ruby_threadptr_data_type;
8559static inline struct rb_thread_struct *
8560rb_thread_ptr(VALUE thval)
8561{
8562 return (struct rb_thread_struct *)rb_check_typeddata(thval, &ruby_threadptr_data_type);
8563}
8564enum rb_thread_status {
8565 THREAD_RUNNABLE,
8566 THREAD_STOPPED,
8567 THREAD_STOPPED_FOREVER,
8568 THREAD_KILLED
8569};
8570typedef void *rb_jmpbuf_t[5];
8571struct rb_vm_tag {
8572 VALUE tag;
8573 VALUE retval;
8574 rb_jmpbuf_t buf;
8575 struct rb_vm_tag *prev;
8576 enum ruby_tag_type state;
8577};
8578__extension__ _Static_assert(__builtin_offsetof (struct rb_vm_tag, buf) > 0, "rb_vm_tag_buf_offset" ": " "offsetof(struct rb_vm_tag, buf) > 0");
8579__extension__ _Static_assert(__builtin_offsetof (struct rb_vm_tag, buf) + sizeof(rb_jmpbuf_t) < sizeof(struct rb_vm_tag), "rb_vm_tag_buf_end" ": " "offsetof(struct rb_vm_tag, buf) + sizeof(rb_jmpbuf_t) < sizeof(struct rb_vm_tag)");
8580struct rb_vm_protect_tag {
8581 struct rb_vm_protect_tag *prev;
8582};
8583struct rb_unblock_callback {
8585 void *arg;
8586};
8587struct rb_mutex_struct;
8588typedef struct rb_thread_list_struct{
8589 struct rb_thread_list_struct *next;
8590 struct rb_thread_struct *th;
8592typedef struct rb_ensure_entry {
8593 VALUE marker;
8594 VALUE (*e_proc)(VALUE);
8595 VALUE data2;
8597typedef struct rb_ensure_list {
8598 struct rb_ensure_list *next;
8599 struct rb_ensure_entry entry;
8601typedef char rb_thread_id_string_t[sizeof(rb_nativethread_id_t) * 2 + 3];
8602typedef struct rb_fiber_struct rb_fiber_t;
8603typedef struct rb_execution_context_struct {
8604 VALUE *vm_stack;
8605 size_t vm_stack_size;
8606 rb_control_frame_t *cfp;
8607 struct rb_vm_tag *tag;
8608 struct rb_vm_protect_tag *protect_tag;
8609 rb_atomic_t interrupt_flag;
8610 rb_atomic_t interrupt_mask;
8611 rb_fiber_t *fiber_ptr;
8612 struct rb_thread_struct *thread_ptr;
8613 st_table *local_storage;
8614 VALUE local_storage_recursive_hash;
8615 VALUE local_storage_recursive_hash_for_trace;
8616 const VALUE *root_lep;
8617 VALUE root_svar;
8618 rb_ensure_list_t *ensure_list;
8619 struct rb_trace_arg_struct *trace_arg;
8620 VALUE errinfo;
8621 VALUE passed_block_handler;
8622 uint8_t raised_flag;
8623 enum method_missing_reason method_missing_reason : 8;
8624 VALUE private_const_reference;
8625 struct {
8626 VALUE *stack_start;
8627 VALUE *stack_end;
8628 size_t stack_maxsize;
8629 __attribute__((__aligned__(8))) jmp_buf regs;
8630 } machine;
8632void rb_ec_set_vm_stack(rb_execution_context_t *ec, VALUE *stack, size_t size);
8633void rb_ec_initialize_vm_stack(rb_execution_context_t *ec, VALUE *stack, size_t size);
8634void rb_ec_clear_vm_stack(rb_execution_context_t *ec);
8635typedef struct rb_thread_struct {
8636 struct list_node vmlt_node;
8637 VALUE self;
8638 rb_vm_t *vm;
8640 VALUE last_status;
8641 struct rb_calling_info *calling;
8642 VALUE top_self;
8643 VALUE top_wrapper;
8644 rb_nativethread_id_t thread_id;
8645 enum rb_thread_status status : 2;
8646 unsigned int to_kill : 1;
8647 unsigned int abort_on_exception: 1;
8648 unsigned int report_on_exception: 1;
8649 unsigned int pending_interrupt_queue_checked: 1;
8650 int8_t priority;
8651 uint32_t running_time_us;
8652 native_thread_data_t native_thread_data;
8653 void *blocking_region_buffer;
8654 VALUE thgroup;
8655 VALUE value;
8656 VALUE pending_interrupt_queue;
8657 VALUE pending_interrupt_mask_stack;
8658 rb_nativethread_lock_t interrupt_lock;
8659 struct rb_unblock_callback unblock;
8660 VALUE locking_mutex;
8661 struct rb_mutex_struct *keeping_mutexes;
8662 rb_thread_list_t *join_list;
8663 union {
8664 struct {
8665 VALUE proc;
8666 VALUE args;
8667 int kw_splat;
8668 } proc;
8669 struct {
8670 VALUE (*func)(void *);
8671 void *arg;
8672 } func;
8673 } invoke_arg;
8674 enum {
8675 thread_invoke_type_none = 0,
8676 thread_invoke_type_proc,
8677 thread_invoke_type_func
8678 } invoke_type;
8679 VALUE stat_insn_usage;
8680 rb_fiber_t *root_fiber;
8681 rb_jmpbuf_t root_jmpbuf;
8682 VALUE name;
8683} rb_thread_t;
8684typedef enum {
8685 VM_DEFINECLASS_TYPE_CLASS = 0x00,
8686 VM_DEFINECLASS_TYPE_SINGLETON_CLASS = 0x01,
8687 VM_DEFINECLASS_TYPE_MODULE = 0x02,
8688 VM_DEFINECLASS_TYPE_MASK = 0x07
8689} rb_vm_defineclass_type_t;
8690
8691
8692rb_iseq_t *rb_iseq_new (const rb_ast_body_t *ast, VALUE name, VALUE path, VALUE realpath, const rb_iseq_t *parent, enum iseq_type);
8693rb_iseq_t *rb_iseq_new_top (const rb_ast_body_t *ast, VALUE name, VALUE path, VALUE realpath, const rb_iseq_t *parent);
8694rb_iseq_t *rb_iseq_new_main (const rb_ast_body_t *ast, VALUE path, VALUE realpath, const rb_iseq_t *parent);
8695rb_iseq_t *rb_iseq_new_with_opt(const rb_ast_body_t *ast, VALUE name, VALUE path, VALUE realpath, VALUE first_lineno,
8696 const rb_iseq_t *parent, enum iseq_type, const rb_compile_option_t*);
8697struct iseq_link_anchor;
8699 VALUE flags;
8700 VALUE reserved;
8701 void (*func)(rb_iseq_t *, struct iseq_link_anchor *, const void *);
8702 const void *data;
8703};
8704static inline struct rb_iseq_new_with_callback_callback_func *
8705rb_iseq_new_with_callback_new_callback(
8706 void (*func)(rb_iseq_t *, struct iseq_link_anchor *, const void *), const void *ptr)
8707{
8708 VALUE memo = rb_imemo_new(imemo_ifunc, (VALUE)func, (VALUE)ptr, ((VALUE)RUBY_Qundef), ((VALUE)RUBY_Qfalse));
8709 return (struct rb_iseq_new_with_callback_callback_func *)memo;
8710}
8711rb_iseq_t *rb_iseq_new_with_callback(const struct rb_iseq_new_with_callback_callback_func * ifunc,
8712 VALUE name, VALUE path, VALUE realpath, VALUE first_lineno,
8713 const rb_iseq_t *parent, enum iseq_type, const rb_compile_option_t*);
8714VALUE rb_iseq_disasm(const rb_iseq_t *iseq);
8715int rb_iseq_disasm_insn(VALUE str, const VALUE *iseqval, size_t pos, const rb_iseq_t *iseq, VALUE child);
8716VALUE rb_iseq_coverage(const rb_iseq_t *iseq);
8717extern VALUE rb_cISeq;
8718extern VALUE rb_cRubyVM;
8719extern VALUE rb_mRubyVMFrozenCore;
8720extern VALUE rb_block_param_proxy;
8721
8722
8723typedef struct {
8724 const struct rb_block block;
8725 unsigned int is_from_method: 1;
8726 unsigned int is_lambda: 1;
8727} rb_proc_t;
8728typedef struct {
8729 VALUE flags;
8730 rb_iseq_t *iseq;
8731 const VALUE *ep;
8732 const VALUE *env;
8733 unsigned int env_size;
8734} rb_env_t;
8735extern const rb_data_type_t ruby_binding_data_type;
8736typedef struct {
8737 const struct rb_block block;
8738 const VALUE pathobj;
8739 unsigned short first_lineno;
8740} rb_binding_t;
8741enum vm_check_match_type {
8742 VM_CHECKMATCH_TYPE_WHEN = 1,
8743 VM_CHECKMATCH_TYPE_CASE = 2,
8744 VM_CHECKMATCH_TYPE_RESCUE = 3
8745};
8746enum vm_call_flag_bits {
8747 VM_CALL_ARGS_SPLAT_bit,
8748 VM_CALL_ARGS_BLOCKARG_bit,
8749 VM_CALL_FCALL_bit,
8750 VM_CALL_VCALL_bit,
8751 VM_CALL_ARGS_SIMPLE_bit,
8752 VM_CALL_BLOCKISEQ_bit,
8753 VM_CALL_KWARG_bit,
8754 VM_CALL_KW_SPLAT_bit,
8755 VM_CALL_TAILCALL_bit,
8756 VM_CALL_SUPER_bit,
8757 VM_CALL_ZSUPER_bit,
8758 VM_CALL_OPT_SEND_bit,
8759 VM_CALL__END
8760};
8761enum vm_special_object_type {
8762 VM_SPECIAL_OBJECT_VMCORE = 1,
8763 VM_SPECIAL_OBJECT_CBASE,
8764 VM_SPECIAL_OBJECT_CONST_BASE
8765};
8766enum vm_svar_index {
8767 VM_SVAR_LASTLINE = 0,
8768 VM_SVAR_BACKREF = 1,
8769 VM_SVAR_EXTRA_START = 2,
8770 VM_SVAR_FLIPFLOP_START = 2
8771};
8772typedef struct iseq_inline_cache_entry *IC;
8773typedef struct iseq_inline_iv_cache_entry *IVC;
8774typedef union iseq_inline_storage_entry *ISE;
8775typedef struct rb_call_info *CALL_INFO;
8776typedef struct rb_call_cache *CALL_CACHE;
8777typedef struct rb_call_data *CALL_DATA;
8778typedef VALUE CDHASH;
8779typedef rb_control_frame_t *
8780 (*rb_insn_func_t)(rb_execution_context_t *, rb_control_frame_t *);
8781enum {
8782 VM_FRAME_MAGIC_METHOD = 0x11110001,
8783 VM_FRAME_MAGIC_BLOCK = 0x22220001,
8784 VM_FRAME_MAGIC_CLASS = 0x33330001,
8785 VM_FRAME_MAGIC_TOP = 0x44440001,
8786 VM_FRAME_MAGIC_CFUNC = 0x55550001,
8787 VM_FRAME_MAGIC_IFUNC = 0x66660001,
8788 VM_FRAME_MAGIC_EVAL = 0x77770001,
8789 VM_FRAME_MAGIC_RESCUE = 0x78880001,
8790 VM_FRAME_MAGIC_DUMMY = 0x79990001,
8791 VM_FRAME_MAGIC_MASK = 0x7fff0001,
8792 VM_FRAME_FLAG_PASSED = 0x0010,
8793 VM_FRAME_FLAG_FINISH = 0x0020,
8794 VM_FRAME_FLAG_BMETHOD = 0x0040,
8795 VM_FRAME_FLAG_CFRAME = 0x0080,
8796 VM_FRAME_FLAG_LAMBDA = 0x0100,
8797 VM_FRAME_FLAG_MODIFIED_BLOCK_PARAM = 0x0200,
8798 VM_FRAME_FLAG_CFRAME_KW = 0x0400,
8799 VM_FRAME_FLAG_CFRAME_EMPTY_KW = 0x0800,
8800 VM_ENV_FLAG_LOCAL = 0x0002,
8801 VM_ENV_FLAG_ESCAPED = 0x0004,
8802 VM_ENV_FLAG_WB_REQUIRED = 0x0008
8803};
8804static inline void VM_FORCE_WRITE_SPECIAL_CONST(const VALUE *ptr, VALUE special_const_value);
8805static inline void
8806VM_ENV_FLAGS_SET(const VALUE *ep, VALUE flag)
8807{
8808 VALUE flags = ep[( 0)];
8809 ((void)0);
8810 VM_FORCE_WRITE_SPECIAL_CONST(&ep[( 0)], flags | flag);
8811}
8812static inline void
8813VM_ENV_FLAGS_UNSET(const VALUE *ep, VALUE flag)
8814{
8815 VALUE flags = ep[( 0)];
8816 ((void)0);
8817 VM_FORCE_WRITE_SPECIAL_CONST(&ep[( 0)], flags & ~flag);
8818}
8819static inline unsigned long
8820VM_ENV_FLAGS(const VALUE *ep, long flag)
8821{
8822 VALUE flags = ep[( 0)];
8823 ((void)0);
8824 return flags & flag;
8825}
8826static inline unsigned long
8827VM_FRAME_TYPE(const rb_control_frame_t *cfp)
8828{
8829 return VM_ENV_FLAGS(cfp->ep, VM_FRAME_MAGIC_MASK);
8830}
8831static inline int
8832VM_FRAME_LAMBDA_P(const rb_control_frame_t *cfp)
8833{
8834 return VM_ENV_FLAGS(cfp->ep, VM_FRAME_FLAG_LAMBDA) != 0;
8835}
8836static inline int
8837VM_FRAME_CFRAME_KW_P(const rb_control_frame_t *cfp)
8838{
8839 return VM_ENV_FLAGS(cfp->ep, VM_FRAME_FLAG_CFRAME_KW) != 0;
8840}
8841static inline int
8842VM_FRAME_CFRAME_EMPTY_KW_P(const rb_control_frame_t *cfp)
8843{
8844 return VM_ENV_FLAGS(cfp->ep, VM_FRAME_FLAG_CFRAME_EMPTY_KW) != 0;
8845}
8846static inline int
8847VM_FRAME_FINISHED_P(const rb_control_frame_t *cfp)
8848{
8849 return VM_ENV_FLAGS(cfp->ep, VM_FRAME_FLAG_FINISH) != 0;
8850}
8851static inline int
8852VM_FRAME_BMETHOD_P(const rb_control_frame_t *cfp)
8853{
8854 return VM_ENV_FLAGS(cfp->ep, VM_FRAME_FLAG_BMETHOD) != 0;
8855}
8856static inline int
8857rb_obj_is_iseq(VALUE iseq)
8858{
8859 return imemo_type_p(iseq, imemo_iseq);
8860}
8861static inline int
8862VM_FRAME_CFRAME_P(const rb_control_frame_t *cfp)
8863{
8864 int cframe_p = VM_ENV_FLAGS(cfp->ep, VM_FRAME_FLAG_CFRAME) != 0;
8865 ((void)0);
8866 return cframe_p;
8867}
8868static inline int
8869VM_FRAME_RUBYFRAME_P(const rb_control_frame_t *cfp)
8870{
8871 return !VM_FRAME_CFRAME_P(cfp);
8872}
8873static inline int
8874VM_ENV_LOCAL_P(const VALUE *ep)
8875{
8876 return VM_ENV_FLAGS(ep, VM_ENV_FLAG_LOCAL) ? 1 : 0;
8877}
8878static inline const VALUE *
8879VM_ENV_PREV_EP(const VALUE *ep)
8880{
8881 ((void)0);
8882 return ((void *)(((ep[(-1)])) & ~0x03));
8883}
8884static inline VALUE
8885VM_ENV_BLOCK_HANDLER(const VALUE *ep)
8886{
8887 ((void)0);
8888 return ep[(-1)];
8889}
8890static inline int
8891VM_ENV_ESCAPED_P(const VALUE *ep)
8892{
8893 ((void)0);
8894 return VM_ENV_FLAGS(ep, VM_ENV_FLAG_ESCAPED) ? 1 : 0;
8895}
8896static inline VALUE
8897VM_ENV_ENVVAL(const VALUE *ep)
8898{
8899 VALUE envval = ep[( 1)];
8900 ((void)0);
8901 ((void)0);
8902 return envval;
8903}
8904static inline const rb_env_t *
8905VM_ENV_ENVVAL_PTR(const VALUE *ep)
8906{
8907 return (const rb_env_t *)VM_ENV_ENVVAL(ep);
8908}
8909static inline const rb_env_t *
8910vm_env_new(VALUE *env_ep, VALUE *env_body, unsigned int env_size, const rb_iseq_t *iseq)
8911{
8912 rb_env_t *env = (rb_env_t *)rb_imemo_new(imemo_env, (VALUE)env_ep, (VALUE)env_body, 0, (VALUE)iseq);
8913 env->env_size = env_size;
8914 env_ep[( 1)] = (VALUE)env;
8915 return env;
8916}
8917static inline void
8918VM_FORCE_WRITE(const VALUE *ptr, VALUE v)
8919{
8920 *((VALUE *)ptr) = v;
8921}
8922static inline void
8923VM_FORCE_WRITE_SPECIAL_CONST(const VALUE *ptr, VALUE special_const_value)
8924{
8925 ((void)0);
8926 VM_FORCE_WRITE(ptr, special_const_value);
8927}
8928static inline void
8929VM_STACK_ENV_WRITE(const VALUE *ep, int index, VALUE v)
8930{
8931 ((void)0);
8932 VM_FORCE_WRITE(&ep[index], v);
8933}static inline
8934const VALUE *rb_vm_ep_local_ep(const VALUE *ep);
8935const VALUE *rb_vm_proc_local_ep(VALUE proc);static inline
8936void rb_vm_block_ep_update(VALUE obj, const struct rb_block *dst, const VALUE *ep);
8937void rb_vm_block_copy(VALUE obj, const struct rb_block *dst, const struct rb_block *src);static inline
8938VALUE rb_vm_frame_block_handler(const rb_control_frame_t *cfp);
8939static inline const rb_control_frame_t *
8940RUBY_VM_END_CONTROL_FRAME(const rb_execution_context_t *ec)
8941{
8942 return (rb_control_frame_t *)(ec->vm_stack + ec->vm_stack_size);
8943}
8944static inline int
8945RUBY_VM_CONTROL_FRAME_STACK_OVERFLOW_P(const rb_execution_context_t *ec, const rb_control_frame_t *cfp)
8946{
8947 return !((void *)(RUBY_VM_END_CONTROL_FRAME(ec)) > (void *)(cfp));
8948}
8949static inline int
8950VM_BH_ISEQ_BLOCK_P(VALUE block_handler)
8951{
8952 if ((block_handler & 0x03) == 0x01) {
8953 return 1;
8954 }
8955 else {
8956 return 0;
8957 }
8958}
8959static inline VALUE
8960VM_BH_FROM_ISEQ_BLOCK(const struct rb_captured_block *captured)
8961{
8962 VALUE block_handler = ((VALUE)(captured) | (0x01));
8963 ((void)0);
8964 return block_handler;
8965}
8966static inline const struct rb_captured_block *
8967VM_BH_TO_ISEQ_BLOCK(VALUE block_handler)
8968{
8969 struct rb_captured_block *captured = ((void *)((block_handler) & ~0x03));
8970 ((void)0);
8971 return captured;
8972}
8973static inline int
8974VM_BH_IFUNC_P(VALUE block_handler)
8975{
8976 if ((block_handler & 0x03) == 0x03) {
8977 return 1;
8978 }
8979 else {
8980 return 0;
8981 }
8982}
8983static inline VALUE
8984VM_BH_FROM_IFUNC_BLOCK(const struct rb_captured_block *captured)
8985{
8986 VALUE block_handler = ((VALUE)(captured) | (0x03));
8987 ((void)0);
8988 return block_handler;
8989}
8990static inline const struct rb_captured_block *
8991VM_BH_TO_IFUNC_BLOCK(VALUE block_handler)
8992{
8993 struct rb_captured_block *captured = ((void *)((block_handler) & ~0x03));
8994 ((void)0);
8995 return captured;
8996}
8997static inline const struct rb_captured_block *
8998VM_BH_TO_CAPT_BLOCK(VALUE block_handler)
8999{
9000 struct rb_captured_block *captured = ((void *)((block_handler) & ~0x03));
9001 ((void)0);
9002 return captured;
9003}
9004static inline enum rb_block_handler_type
9005vm_block_handler_type(VALUE block_handler)
9006{
9007 if (VM_BH_ISEQ_BLOCK_P(block_handler)) {
9008 return block_handler_type_iseq;
9009 }
9010 else if (VM_BH_IFUNC_P(block_handler)) {
9011 return block_handler_type_ifunc;
9012 }
9013 else if (((((VALUE)(block_handler)&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG)||(!(((VALUE)(block_handler) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(block_handler) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(block_handler))->flags & RUBY_T_MASK) == (RUBY_T_SYMBOL)))) {
9014 return block_handler_type_symbol;
9015 }
9016 else {
9017 ((void)0);
9018 return block_handler_type_proc;
9019 }
9020}
9021static inline void
9022vm_block_handler_verify(__attribute__ ((__unused__)) VALUE block_handler)
9023{
9024 ((void)0);
9025}
9026static inline int
9027vm_cfp_forwarded_bh_p(const rb_control_frame_t *cfp, VALUE block_handler)
9028{
9029 return ((VALUE) cfp->block_code) == block_handler;
9030}
9031static inline enum rb_block_type
9032vm_block_type(const struct rb_block *block)
9033{
9034 return block->type;
9035}
9036static inline void
9037vm_block_type_set(const struct rb_block *block, enum rb_block_type type)
9038{
9039 struct rb_block *mb = (struct rb_block *)block;
9040 mb->type = type;
9041}
9042static inline const struct rb_block *
9043vm_proc_block(VALUE procval)
9044{
9045 ((void)0);
9046 return &((rb_proc_t *)(((struct RTypedData*)(procval))->data))->block;
9047}
9048static inline const rb_iseq_t *vm_block_iseq(const struct rb_block *block);
9049static inline const VALUE *vm_block_ep(const struct rb_block *block);
9050static inline const rb_iseq_t *
9051vm_proc_iseq(VALUE procval)
9052{
9053 return vm_block_iseq(vm_proc_block(procval));
9054}
9055static inline const VALUE *
9056vm_proc_ep(VALUE procval)
9057{
9058 return vm_block_ep(vm_proc_block(procval));
9059}
9060static inline const rb_iseq_t *
9061vm_block_iseq(const struct rb_block *block)
9062{
9063 switch (vm_block_type(block)) {
9064 case block_type_iseq: return rb_iseq_check(block->as.captured.code.iseq);
9065 case block_type_proc: return vm_proc_iseq(block->as.proc);
9066 case block_type_ifunc:
9067 case block_type_symbol: return ((void *)0);
9068 }
9069 __builtin_unreachable();
9070 return ((void *)0);
9071}
9072static inline const VALUE *
9073vm_block_ep(const struct rb_block *block)
9074{
9075 switch (vm_block_type(block)) {
9076 case block_type_iseq:
9077 case block_type_ifunc: return block->as.captured.ep;
9078 case block_type_proc: return vm_proc_ep(block->as.proc);
9079 case block_type_symbol: return ((void *)0);
9080 }
9081 __builtin_unreachable();
9082 return ((void *)0);
9083}
9084static inline VALUE
9085vm_block_self(const struct rb_block *block)
9086{
9087 switch (vm_block_type(block)) {
9088 case block_type_iseq:
9089 case block_type_ifunc:
9090 return block->as.captured.self;
9091 case block_type_proc:
9092 return vm_block_self(vm_proc_block(block->as.proc));
9093 case block_type_symbol:
9094 return ((VALUE)RUBY_Qundef);
9095 }
9096 __builtin_unreachable();
9097 return ((VALUE)RUBY_Qundef);
9098}
9099static inline VALUE
9100VM_BH_TO_SYMBOL(VALUE block_handler)
9101{
9102 ((void)0);
9103 return block_handler;
9104}
9105static inline VALUE
9106VM_BH_FROM_SYMBOL(VALUE symbol)
9107{
9108 ((void)0);
9109 return symbol;
9110}
9111static inline VALUE
9112VM_BH_TO_PROC(VALUE block_handler)
9113{
9114 ((void)0);
9115 return block_handler;
9116}
9117static inline VALUE
9118VM_BH_FROM_PROC(VALUE procval)
9119{
9120 ((void)0);
9121 return procval;
9122}
9123VALUE rb_thread_alloc(VALUE klass);
9124VALUE rb_binding_alloc(VALUE klass);
9125VALUE rb_proc_alloc(VALUE klass);
9126VALUE rb_proc_dup(VALUE self);
9127extern void rb_vmdebug_stack_dump_raw(const rb_execution_context_t *ec, const rb_control_frame_t *cfp);
9128extern void rb_vmdebug_debug_print_pre(const rb_execution_context_t *ec, const rb_control_frame_t *cfp, const VALUE *_pc);
9129extern void rb_vmdebug_debug_print_post(const rb_execution_context_t *ec, const rb_control_frame_t *cfp
9130);
9131void rb_vm_bugreport(const void *);
9132typedef void (*ruby_sighandler_t)(int);
9133__attribute__ ((__noreturn__)) void rb_bug_for_fatal_signal(ruby_sighandler_t default_sighandler, int sig, const void *, const char *fmt, ...);
9134
9135
9136VALUE rb_iseq_eval(const rb_iseq_t *iseq);
9137VALUE rb_iseq_eval_main(const rb_iseq_t *iseq);
9138VALUE rb_iseq_path(const rb_iseq_t *iseq);
9139VALUE rb_iseq_realpath(const rb_iseq_t *iseq);
9140
9141
9142VALUE rb_iseq_pathobj_new(VALUE path, VALUE realpath);
9143void rb_iseq_pathobj_set(const rb_iseq_t *iseq, VALUE path, VALUE realpath);
9144int rb_ec_frame_method_id_and_class(const rb_execution_context_t *ec, ID *idp, ID *called_idp, VALUE *klassp);
9145void rb_ec_setup_exception(const rb_execution_context_t *ec, VALUE mesg, VALUE cause);
9146VALUE rb_vm_invoke_proc(rb_execution_context_t *ec, rb_proc_t *proc, int argc, const VALUE *argv, int kw_splat, VALUE block_handler);
9147VALUE rb_vm_make_proc_lambda(const rb_execution_context_t *ec, const struct rb_captured_block *captured, VALUE klass, int8_t is_lambda);
9148static inline VALUE
9149rb_vm_make_proc(const rb_execution_context_t *ec, const struct rb_captured_block *captured, VALUE klass)
9150{
9151 return rb_vm_make_proc_lambda(ec, captured, klass, 0);
9152}
9153static inline VALUE
9154rb_vm_make_lambda(const rb_execution_context_t *ec, const struct rb_captured_block *captured, VALUE klass)
9155{
9156 return rb_vm_make_proc_lambda(ec, captured, klass, 1);
9157}
9158VALUE rb_vm_make_binding(const rb_execution_context_t *ec, const rb_control_frame_t *src_cfp);
9159VALUE rb_vm_env_local_variables(const rb_env_t *env);
9160const rb_env_t *rb_vm_env_prev_env(const rb_env_t *env);
9161const VALUE *rb_binding_add_dynavars(VALUE bindval, rb_binding_t *bind, int dyncount, const ID *dynvars);
9162void rb_vm_inc_const_missing_count(void);
9163void rb_vm_gvl_destroy(rb_vm_t *vm);
9164VALUE rb_vm_call_kw(rb_execution_context_t *ec, VALUE recv, VALUE id, int argc,
9165 const VALUE *argv, const rb_callable_method_entry_t *me, int kw_splat);
9166static void rb_vm_pop_frame(rb_execution_context_t *ec);
9167void rb_thread_start_timer_thread(void);
9168void rb_thread_stop_timer_thread(void);
9169void rb_thread_reset_timer_thread(void);
9170void rb_thread_wakeup_timer_thread(int);
9171static inline void
9172rb_vm_living_threads_init(rb_vm_t *vm)
9173{
9174 list_head_init(&vm->waiting_fds);
9175 list_head_init(&vm->waiting_pids);
9176 list_head_init(&vm->workqueue);
9177 list_head_init(&vm->waiting_grps);
9178 list_head_init(&vm->living_threads);
9179 vm->living_thread_num = 0;
9180}
9181static inline void
9182rb_vm_living_threads_insert(rb_vm_t *vm, rb_thread_t *th)
9183{
9184 list_add_tail_(&vm->living_threads, &th->vmlt_node, "./vm_core.h" ":" "1703");
9185 vm->living_thread_num++;
9186}
9187static inline void
9188rb_vm_living_threads_remove(rb_vm_t *vm, rb_thread_t *th)
9189{
9190 list_del_(&th->vmlt_node, "./vm_core.h" ":" "1710");
9191 vm->living_thread_num--;
9192}
9193typedef int rb_backtrace_iter_func(void *, VALUE, int, VALUE);
9194rb_control_frame_t *rb_vm_get_ruby_level_next_cfp(const rb_execution_context_t *ec, const rb_control_frame_t *cfp);
9195rb_control_frame_t *rb_vm_get_binding_creatable_next_cfp(const rb_execution_context_t *ec, const rb_control_frame_t *cfp);
9196int rb_vm_get_sourceline(const rb_control_frame_t *);
9197void rb_vm_stack_to_heap(rb_execution_context_t *ec);
9198void ruby_thread_init_stack(rb_thread_t *th);
9199int rb_vm_control_frame_id_and_class(const rb_control_frame_t *cfp, ID *idp, ID *called_idp, VALUE *klassp);
9200void rb_vm_rewind_cfp(rb_execution_context_t *ec, rb_control_frame_t *cfp);
9201static VALUE rb_vm_bh_to_procval(const rb_execution_context_t *ec, VALUE block_handler);
9202void rb_vm_register_special_exception_str(enum ruby_special_exceptions sp, VALUE exception_class, VALUE mesg);
9203void rb_gc_mark_machine_stack(const rb_execution_context_t *ec);static inline
9204void rb_vm_rewrite_cref(rb_cref_t *node, VALUE old_klass, VALUE new_klass, rb_cref_t **new_cref_ptr);
9205static const rb_callable_method_entry_t *rb_vm_frame_method_entry(const rb_control_frame_t *cfp);
9206VALUE rb_catch_protect(VALUE t, rb_block_call_func *func, VALUE data, enum ruby_tag_type *stateptr);
9207
9208
9209extern rb_vm_t *ruby_current_vm_ptr;
9210extern rb_execution_context_t *ruby_current_execution_context_ptr;
9211extern rb_event_flag_t ruby_vm_event_flags;
9212extern rb_event_flag_t ruby_vm_event_enabled_global_flags;
9213extern unsigned int ruby_vm_event_local_num;
9214
9215
9216static inline rb_thread_t *
9217rb_ec_thread_ptr(const rb_execution_context_t *ec)
9218{
9219 return ec->thread_ptr;
9220}
9221static inline rb_vm_t *
9222rb_ec_vm_ptr(const rb_execution_context_t *ec)
9223{
9224 const rb_thread_t *th = rb_ec_thread_ptr(ec);
9225 if (th) {
9226 return th->vm;
9227 }
9228 else {
9229 return ((void *)0);
9230 }
9231}
9232static inline rb_execution_context_t *
9233rb_current_execution_context(void)
9234{
9235 return ruby_current_execution_context_ptr;
9236}
9237static inline rb_thread_t *
9238rb_current_thread(void)
9239{
9240 const rb_execution_context_t *ec = rb_current_execution_context();
9241 return rb_ec_thread_ptr(ec);
9242}
9243static inline rb_vm_t *
9244rb_current_vm(void)
9245{
9246 ((void)0);
9247 return ruby_current_vm_ptr;
9248}
9249static inline void
9250rb_thread_set_current_raw(const rb_thread_t *th)
9251{
9252 ruby_current_execution_context_ptr = th->ec;
9253}
9254static inline void
9255rb_thread_set_current(rb_thread_t *th)
9256{
9257 if (th->vm->running_thread != th) {
9258 th->running_time_us = 0;
9259 }
9260 rb_thread_set_current_raw(th);
9261 th->vm->running_thread = th;
9262}
9263enum {
9264 TIMER_INTERRUPT_MASK = 0x01,
9265 PENDING_INTERRUPT_MASK = 0x02,
9266 POSTPONED_JOB_INTERRUPT_MASK = 0x04,
9267 TRAP_INTERRUPT_MASK = 0x08
9268};
9269VALUE rb_exc_set_backtrace(VALUE exc, VALUE bt);
9270int rb_signal_buff_size(void);
9271int rb_signal_exec(rb_thread_t *th, int sig);
9272void rb_threadptr_check_signal(rb_thread_t *mth);
9273void rb_threadptr_signal_raise(rb_thread_t *th, int sig);
9274void rb_threadptr_signal_exit(rb_thread_t *th);
9275int rb_threadptr_execute_interrupts(rb_thread_t *, int);
9276void rb_threadptr_interrupt(rb_thread_t *th);
9277void rb_threadptr_unlock_all_locking_mutexes(rb_thread_t *th);
9278void rb_threadptr_pending_interrupt_clear(rb_thread_t *th);
9279void rb_threadptr_pending_interrupt_enque(rb_thread_t *th, VALUE v);
9280VALUE rb_ec_get_errinfo(const rb_execution_context_t *ec);
9281void rb_ec_error_print(rb_execution_context_t * volatile ec, volatile VALUE errinfo);
9282void rb_execution_context_update(const rb_execution_context_t *ec);
9283void rb_execution_context_mark(const rb_execution_context_t *ec);
9284void rb_fiber_close(rb_fiber_t *fib);
9285void Init_native_thread(rb_thread_t *th);
9286static inline void
9287rb_vm_check_ints(rb_execution_context_t *ec)
9288{
9289 ((void)0);
9290 if ((__builtin_expect(!!(((ec)->interrupt_flag & ~(ec)->interrupt_mask)), 0))) {
9291 rb_threadptr_execute_interrupts(rb_ec_thread_ptr(ec), 0);
9292 }
9293}
9294struct rb_trace_arg_struct {
9295 rb_event_flag_t event;
9297 const rb_control_frame_t *cfp;
9298 VALUE self;
9299 ID id;
9300 ID called_id;
9301 VALUE klass;
9302 VALUE data;
9303 int klass_solved;
9304 int lineno;
9305 VALUE path;
9306};
9307void rb_hook_list_mark(rb_hook_list_t *hooks);
9308void rb_hook_list_free(rb_hook_list_t *hooks);
9309void rb_hook_list_connect_tracepoint(VALUE target, rb_hook_list_t *list, VALUE tpval, unsigned int target_line);
9310void rb_hook_list_remove_tracepoint(rb_hook_list_t *list, VALUE tpval);
9311void rb_exec_event_hooks(struct rb_trace_arg_struct *trace_arg, rb_hook_list_t *hooks, int pop_p);
9312static inline void
9313rb_exec_event_hook_orig(rb_execution_context_t *ec, rb_hook_list_t *hooks, rb_event_flag_t flag,
9314 VALUE self, ID id, ID called_id, VALUE klass, VALUE data, int pop_p)
9315{
9316 struct rb_trace_arg_struct trace_arg;
9317 ((void)0);
9318 trace_arg.event = flag;
9319 trace_arg.ec = ec;
9320 trace_arg.cfp = ec->cfp;
9321 trace_arg.self = self;
9322 trace_arg.id = id;
9323 trace_arg.called_id = called_id;
9324 trace_arg.klass = klass;
9325 trace_arg.data = data;
9326 trace_arg.path = ((VALUE)RUBY_Qundef);
9327 trace_arg.klass_solved = 0;
9328 rb_exec_event_hooks(&trace_arg, hooks, pop_p);
9329}
9330static inline rb_hook_list_t *
9331rb_vm_global_hooks(const rb_execution_context_t *ec)
9332{
9333 return &rb_ec_vm_ptr(ec)->global_hooks;
9334}
9335static inline void
9336rb_exec_event_hook_script_compiled(rb_execution_context_t *ec, const rb_iseq_t *iseq, VALUE eval_script)
9337{
9338 do { const rb_event_flag_t flag_arg_ = (0x2000); rb_hook_list_t *hooks_arg_ = (rb_vm_global_hooks(ec)); if ((__builtin_expect(!!((hooks_arg_)->events & (flag_arg_)), 0))) { rb_exec_event_hook_orig(ec, hooks_arg_, flag_arg_, ec->cfp->self, 0, 0, 0, !((VALUE)(eval_script) != ((VALUE)RUBY_Qnil)) ? (VALUE)iseq : __extension__ ({ const VALUE args_to_new_ary[] = {eval_script, (VALUE)iseq}; if (__builtin_constant_p(2)) { __extension__ _Static_assert(((int)(sizeof(args_to_new_ary) / sizeof((args_to_new_ary)[0]))) == (2), "rb_ary_new_from_args" ": " "numberof(args_to_new_ary) == (2)"); } rb_ary_new_from_values(((int)(sizeof(args_to_new_ary) / sizeof((args_to_new_ary)[0]))), args_to_new_ary); }), 0); } } while (0);
9339}
9340void rb_vm_trap_exit(rb_vm_t *vm);
9341
9342
9343int rb_thread_check_trap_pending(void);
9344extern VALUE rb_get_coverages(void);
9345extern void rb_set_coverages(VALUE, int, VALUE);
9346extern void rb_clear_coverages(void);
9347extern void rb_reset_coverages(void);
9348void rb_postponed_job_flush(rb_vm_t *vm);
9349
9350
9351
9352
9353VALUE ruby_debug_print_value(int level, int debug_level, const char *header, VALUE v);
9354ID ruby_debug_print_id(int level, int debug_level, const char *header, ID id);
9355NODE *ruby_debug_print_node(int level, int debug_level, const char *header, const NODE *node);
9356int ruby_debug_print_indent(int level, int debug_level, int indent_level);
9357void ruby_debug_gc_check_func(void);
9358void ruby_set_debug_option(const char *str);
9359
9360
9361extern const int ruby_api_version[];
9362extern const ID rb_iseq_shared_exc_local_tbl[];
9363static inline size_t
9364rb_call_info_kw_arg_bytes(int keyword_len)
9365{
9366 return rb_size_mul_add_or_raise(
9367 keyword_len - 1, sizeof(VALUE), sizeof(struct rb_call_info_kw_arg),
9368 rb_eRuntimeError);
9369}
9370static inline rb_snum_t
9371ISEQ_FLIP_CNT_INCREMENT(const rb_iseq_t *iseq)
9372{
9373 rb_snum_t cnt = iseq->body->variable.flip_count;
9374 iseq->body->variable.flip_count += 1;
9375 return cnt;
9376}
9377static inline VALUE *
9378ISEQ_ORIGINAL_ISEQ(const rb_iseq_t *iseq)
9379{
9380 return iseq->body->variable.original_iseq;
9381}
9382static inline void
9383ISEQ_ORIGINAL_ISEQ_CLEAR(const rb_iseq_t *iseq)
9384{
9385 void *ptr = iseq->body->variable.original_iseq;
9386 iseq->body->variable.original_iseq = ((void *)0);
9387 if (ptr) {
9388 ruby_xfree(ptr);
9389 }
9390}
9391static inline VALUE *
9392ISEQ_ORIGINAL_ISEQ_ALLOC(const rb_iseq_t *iseq, long size)
9393{
9394 return iseq->body->variable.original_iseq =
9395 ((VALUE*)ruby_xmalloc2((size_t)(size),sizeof(VALUE)));
9396}
9397struct iseq_compile_data {
9398 const VALUE err_info;
9399 const VALUE catch_table_ary;
9400 struct iseq_label_data *start_label;
9401 struct iseq_label_data *end_label;
9402 struct iseq_label_data *redo_label;
9403 const rb_iseq_t *current_block;
9404 struct iseq_compile_data_ensure_node_stack *ensure_node_stack;
9405 struct {
9406 struct iseq_compile_data_storage *storage_head;
9407 struct iseq_compile_data_storage *storage_current;
9408 } node;
9409 struct {
9410 struct iseq_compile_data_storage *storage_head;
9411 struct iseq_compile_data_storage *storage_current;
9412 } insn;
9413 int loopval_popped;
9414 int last_line;
9415 int label_no;
9416 int node_level;
9417 unsigned int ci_index;
9418 unsigned int ci_kw_index;
9419 const rb_compile_option_t *option;
9420 struct rb_id_table *ivar_cache_table;
9421 const struct rb_builtin_function *builtin_function_table;
9422};
9423static inline struct iseq_compile_data *
9424ISEQ_COMPILE_DATA(const rb_iseq_t *iseq)
9425{
9426 if (iseq->flags & ((VALUE)RUBY_FL_USER6)) {
9427 return iseq->aux.compile_data;
9428 }
9429 else {
9430 return ((void *)0);
9431 }
9432}
9433static inline void
9434ISEQ_COMPILE_DATA_ALLOC(rb_iseq_t *iseq)
9435{
9436 iseq->aux.compile_data = (((struct iseq_compile_data*)ruby_xcalloc((size_t)(1),sizeof(struct iseq_compile_data))));
9437 iseq->flags |= ((VALUE)RUBY_FL_USER6);
9438}
9439static inline void
9440ISEQ_COMPILE_DATA_CLEAR(rb_iseq_t *iseq)
9441{
9442 iseq->flags &= ~((VALUE)RUBY_FL_USER6);
9443 iseq->aux.compile_data = ((void *)0);
9444}
9445static inline rb_iseq_t *
9446iseq_imemo_alloc(void)
9447{
9448 return (rb_iseq_t *)rb_imemo_new(imemo_iseq, 0, 0, 0, 0);
9449}
9450VALUE rb_iseq_ibf_dump(const rb_iseq_t *iseq, VALUE opt);
9451void rb_ibf_load_iseq_complete(rb_iseq_t *iseq);
9452const rb_iseq_t *rb_iseq_ibf_load(VALUE str);
9453const rb_iseq_t *rb_iseq_ibf_load_bytes(const char *cstr, size_t);
9454VALUE rb_iseq_ibf_load_extra_data(VALUE str);
9455void rb_iseq_init_trace(rb_iseq_t *iseq);
9456int rb_iseq_add_local_tracepoint_recursively(const rb_iseq_t *iseq, rb_event_flag_t turnon_events, VALUE tpval, unsigned int target_line);
9457int rb_iseq_remove_local_tracepoint_recursively(const rb_iseq_t *iseq, VALUE tpval);
9458const rb_iseq_t *rb_iseq_load_iseq(VALUE fname);
9459unsigned int *rb_iseq_insns_info_decode_positions(const struct rb_iseq_constant_body *body);
9460
9461
9462VALUE rb_iseq_compile_node(rb_iseq_t *iseq, const NODE *node);
9463VALUE rb_iseq_compile_callback(rb_iseq_t *iseq, const struct rb_iseq_new_with_callback_callback_func * ifunc);
9464VALUE *rb_iseq_original_iseq(const rb_iseq_t *iseq);
9465void rb_iseq_build_from_ary(rb_iseq_t *iseq, VALUE misc,
9466 VALUE locals, VALUE args,
9467 VALUE exception, VALUE body);
9468void rb_iseq_mark_insn_storage(struct iseq_compile_data_storage *arena);
9469VALUE rb_iseq_load(VALUE data, VALUE parent, VALUE opt);
9470VALUE rb_iseq_parameters(const rb_iseq_t *iseq, int is_proc);
9471unsigned int rb_iseq_line_no(const rb_iseq_t *iseq, size_t pos);
9472void rb_iseq_trace_set(const rb_iseq_t *iseq, rb_event_flag_t turnon_events);
9473void rb_iseq_trace_set_all(rb_event_flag_t turnon_events);
9474void rb_iseq_insns_info_encode_positions(const rb_iseq_t *iseq);
9475struct rb_iseq_constant_body *rb_iseq_constant_body_alloc(void);
9476VALUE rb_iseqw_new(const rb_iseq_t *iseq);
9477const rb_iseq_t *rb_iseqw_to_iseq(VALUE iseqw);
9478VALUE rb_iseq_absolute_path(const rb_iseq_t *iseq);
9479VALUE rb_iseq_label(const rb_iseq_t *iseq);
9480VALUE rb_iseq_base_label(const rb_iseq_t *iseq);
9481VALUE rb_iseq_first_lineno(const rb_iseq_t *iseq);
9482VALUE rb_iseq_method_name(const rb_iseq_t *iseq);
9483void rb_iseq_code_location(const rb_iseq_t *iseq, int *first_lineno, int *first_column, int *last_lineno, int *last_column);
9484void rb_iseq_remove_coverage_all(void);
9485const rb_iseq_t *rb_method_iseq(VALUE body);
9486const rb_iseq_t *rb_proc_get_iseq(VALUE proc, int *is_proc);
9488 unsigned int inline_const_cache: 1;
9489 unsigned int peephole_optimization: 1;
9490 unsigned int tailcall_optimization: 1;
9491 unsigned int specialized_instruction: 1;
9492 unsigned int operands_unification: 1;
9493 unsigned int instructions_unification: 1;
9494 unsigned int stack_caching: 1;
9495 unsigned int frozen_string_literal: 1;
9496 unsigned int debug_frozen_string_literal: 1;
9497 unsigned int coverage_enabled: 1;
9498 int debug_level;
9499};
9500struct iseq_insn_info_entry {
9501 int line_no;
9502 rb_event_flag_t events;
9503};
9505 enum catch_type {
9506 CATCH_TYPE_RESCUE = (((VALUE)(1))<<1 | RUBY_FIXNUM_FLAG),
9507 CATCH_TYPE_ENSURE = (((VALUE)(2))<<1 | RUBY_FIXNUM_FLAG),
9508 CATCH_TYPE_RETRY = (((VALUE)(3))<<1 | RUBY_FIXNUM_FLAG),
9509 CATCH_TYPE_BREAK = (((VALUE)(4))<<1 | RUBY_FIXNUM_FLAG),
9510 CATCH_TYPE_REDO = (((VALUE)(5))<<1 | RUBY_FIXNUM_FLAG),
9511 CATCH_TYPE_NEXT = (((VALUE)(6))<<1 | RUBY_FIXNUM_FLAG)
9512 } type;
9513 rb_iseq_t *iseq;
9514 unsigned int start;
9515 unsigned int end;
9516 unsigned int cont;
9517 unsigned int sp;
9518};
9519struct iseq_catch_table { unsigned int size; struct iseq_catch_table_entry entries[]; } __attribute__((packed));
9520static inline int
9521iseq_catch_table_bytes(int n)
9522{
9523 enum {
9524 catch_table_entry_size = sizeof(struct iseq_catch_table_entry),
9525 catch_table_entries_max = (0x7fffffff - __builtin_offsetof (struct iseq_catch_table, entries)) / catch_table_entry_size
9526 };
9527 if (n > catch_table_entries_max) rb_fatal("too large iseq_catch_table - %d", n);
9528 return (int)(__builtin_offsetof (struct iseq_catch_table, entries) +
9529 n * catch_table_entry_size);
9530}
9532 struct iseq_compile_data_storage *next;
9533 unsigned int pos;
9534 unsigned int size;
9535 char buff[];
9536};
9537enum defined_type {
9538 DEFINED_NOT_DEFINED,
9539 DEFINED_NIL = 1,
9540 DEFINED_IVAR,
9541 DEFINED_LVAR,
9542 DEFINED_GVAR,
9543 DEFINED_CVAR,
9544 DEFINED_CONST,
9545 DEFINED_METHOD,
9546 DEFINED_YIELD,
9547 DEFINED_ZSUPER,
9548 DEFINED_SELF,
9549 DEFINED_TRUE,
9550 DEFINED_FALSE,
9551 DEFINED_ASGN,
9552 DEFINED_EXPR,
9553 DEFINED_IVAR2,
9554 DEFINED_REF,
9555 DEFINED_FUNC,
9556 DEFINED_CONST_FROM
9557};
9558VALUE rb_iseq_defined_string(enum defined_type type);
9559VALUE rb_iseq_local_variables(const rb_iseq_t *iseq);
9560
9561
9562static inline void
9563vm_passed_block_handler_set(rb_execution_context_t *ec, VALUE block_handler)
9564{
9565 vm_block_handler_verify(block_handler);
9566 ec->passed_block_handler = block_handler;
9567}
9568static inline void
9569pass_passed_block_handler(rb_execution_context_t *ec)
9570{
9571 VALUE block_handler = rb_vm_frame_block_handler(ec->cfp);
9572 vm_passed_block_handler_set(ec, block_handler);
9573 VM_ENV_FLAGS_SET(ec->cfp->ep, VM_FRAME_FLAG_PASSED);
9574}
9575
9576extern int *__errno_location (void) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
9577extern char *program_invocation_name;
9578extern char *program_invocation_short_name;
9579typedef int error_t;
9580
9581static inline int
9582rb_ec_tag_state(const rb_execution_context_t *ec)
9583{
9584 enum ruby_tag_type state = ec->tag->state;
9585 ec->tag->state = RUBY_TAG_NONE;
9586 return state;
9587}
9588__attribute__ ((__noreturn__)) static inline void rb_ec_tag_jump(const rb_execution_context_t *ec, enum ruby_tag_type st);
9589static inline void
9590rb_ec_tag_jump(const rb_execution_context_t *ec, enum ruby_tag_type st)
9591{
9592 ec->tag->state = st;
9593 __builtin_longjmp(((ec->tag->buf)),(1));
9594}
9595static inline VALUE
9596CREF_CLASS(const rb_cref_t *cref)
9597{
9598 return cref->klass;
9599}
9600static inline rb_cref_t *
9601CREF_NEXT(const rb_cref_t *cref)
9602{
9603 return cref->next;
9604}
9605static inline const rb_scope_visibility_t *
9606CREF_SCOPE_VISI(const rb_cref_t *cref)
9607{
9608 return &cref->scope_visi;
9609}
9610static inline VALUE
9611CREF_REFINEMENTS(const rb_cref_t *cref)
9612{
9613 return cref->refinements;
9614}
9615static inline void
9616CREF_REFINEMENTS_SET(rb_cref_t *cref, VALUE refs)
9617{
9618 __extension__({
9619 ;
9620 ; typeof(rb_obj_write((VALUE)(cref), (VALUE *)(&cref->refinements), (VALUE)(refs), "./eval_intern.h", 220)) unaligned_member_access_result = (rb_obj_write((VALUE)(cref), (VALUE *)(&cref->refinements), (VALUE)(refs), "./eval_intern.h", 220));
9621 ; unaligned_member_access_result; });
9622}
9623static inline int
9624CREF_PUSHED_BY_EVAL(const rb_cref_t *cref)
9625{
9626 return cref->flags & ((VALUE)RUBY_FL_USER5);
9627}
9628static inline void
9629CREF_PUSHED_BY_EVAL_SET(rb_cref_t *cref)
9630{
9631 cref->flags |= ((VALUE)RUBY_FL_USER5);
9632}
9633static inline int
9634CREF_OMOD_SHARED(const rb_cref_t *cref)
9635{
9636 return cref->flags & ((VALUE)RUBY_FL_USER6);
9637}
9638static inline void
9639CREF_OMOD_SHARED_SET(rb_cref_t *cref)
9640{
9641 cref->flags |= ((VALUE)RUBY_FL_USER6);
9642}
9643static inline void
9644CREF_OMOD_SHARED_UNSET(rb_cref_t *cref)
9645{
9646 cref->flags &= ~((VALUE)RUBY_FL_USER6);
9647}
9648enum {
9649 RAISED_EXCEPTION = 1,
9650 RAISED_STACKOVERFLOW = 2,
9651 RAISED_NOMEMORY = 4
9652};
9653int rb_ec_set_raised(rb_execution_context_t *ec);
9654int rb_ec_reset_raised(rb_execution_context_t *ec);
9655int rb_ec_stack_check(rb_execution_context_t *ec);
9656VALUE rb_f_eval(int argc, const VALUE *argv, VALUE self);
9657VALUE rb_make_exception(int argc, const VALUE *argv);
9658__attribute__ ((__noreturn__)) void rb_method_name_error(VALUE, VALUE);
9659__attribute__ ((__noreturn__)) void rb_fiber_start(void);
9660__attribute__ ((__noreturn__)) void rb_print_undef(VALUE, ID, rb_method_visibility_t);
9661__attribute__ ((__noreturn__)) void rb_print_undef_str(VALUE, VALUE);
9662__attribute__ ((__noreturn__)) void rb_print_inaccessible(VALUE, ID, rb_method_visibility_t);
9663__attribute__ ((__noreturn__)) void rb_vm_localjump_error(const char *,VALUE, int);
9664__attribute__ ((__noreturn__)) void rb_vm_jump_tag_but_local_jump(int);
9665VALUE rb_vm_make_jump_tag_but_local_jump(int state, VALUE val);
9666rb_cref_t *rb_vm_cref(void);
9667rb_cref_t *rb_vm_cref_replace_with_duplicated_cref(void);
9668VALUE rb_vm_call_cfunc(VALUE recv, VALUE (*func)(VALUE), VALUE arg, VALUE block_handler, VALUE filename);
9669void rb_vm_set_progname(VALUE filename);
9670void rb_thread_terminate_all(void);
9671VALUE rb_vm_cbase(void);
9672VALUE rb_ec_backtrace_object(const rb_execution_context_t *ec);
9673VALUE rb_ec_backtrace_str_ary(const rb_execution_context_t *ec, long lev, long n);
9674VALUE rb_ec_backtrace_location_ary(const rb_execution_context_t *ec, long lev, long n);
9676 const void * const func_ptr;
9677 const int argc;
9678 const int index;
9679 const char * const name;
9680};
9681void rb_load_with_builtin_functions(const char *feature_name, const struct rb_builtin_function *table);
9682static inline void rb_builtin_function_check_arity0(VALUE (*f)(rb_execution_context_t *ec, VALUE self)){}
9683static inline void rb_builtin_function_check_arity1(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE)){}
9684static inline void rb_builtin_function_check_arity2(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE)){}
9685static inline void rb_builtin_function_check_arity3(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE, VALUE)){}
9686static inline void rb_builtin_function_check_arity4(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE, VALUE, VALUE)){}
9687static inline void rb_builtin_function_check_arity5(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE, VALUE, VALUE, VALUE)){}
9688static inline void rb_builtin_function_check_arity6(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)){}
9689static inline void rb_builtin_function_check_arity7(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)){}
9690static inline void rb_builtin_function_check_arity8(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)){}
9691static inline void rb_builtin_function_check_arity9(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)){}
9692static inline void rb_builtin_function_check_arity10(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)){}
9693static inline void rb_builtin_function_check_arity11(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)){}
9694static inline void rb_builtin_function_check_arity12(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)){}
9695static inline void rb_builtin_function_check_arity13(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)){}
9696static inline void rb_builtin_function_check_arity14(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)){}
9697static inline void rb_builtin_function_check_arity15(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)){}static inline
9698VALUE rb_vm_lvar_exposed(rb_execution_context_t *ec, int index);
9699__attribute__ ((__pure__)) static inline VALUE rb_vm_lvar(rb_execution_context_t *ec, int index);
9700static inline VALUE
9701rb_vm_lvar(rb_execution_context_t *ec, int index)
9702{
9703 return ec->cfp->ep[index];
9704}
9706 const char *feature;
9707 const unsigned char *bin;
9708 size_t bin_size;
9709};
9711 const char *classname;
9712 const char *methodname;
9713 const char *filename;
9714 int line_no;
9715 volatile VALUE klass;
9716 volatile VALUE name;
9717};
9718__attribute__ ((__noinline__)) int rb_dtrace_setup(rb_execution_context_t *, VALUE, ID, struct ruby_dtrace_method_hook_args *);
9719VALUE rb_str_concat_literals(size_t, const VALUE*);
9720__attribute__ ((__visibility__("default"))) extern
9721VALUE rb_vm_exec(rb_execution_context_t *, int);
9722__attribute__ ((__pure__)) static inline const VALUE *VM_EP_LEP(const VALUE *);
9723static inline const VALUE *
9724VM_EP_LEP(const VALUE *ep)
9725{
9726 while (!VM_ENV_LOCAL_P(ep)) {
9727 ep = VM_ENV_PREV_EP(ep);
9728 }
9729 return ep;
9730}
9731static inline const rb_control_frame_t *
9732rb_vm_search_cf_from_ep(const rb_execution_context_t *ec, const rb_control_frame_t *cfp, const VALUE * const ep)
9733{
9734 if (!ep) {
9735 return ((void *)0);
9736 }
9737 else {
9738 const rb_control_frame_t * const eocfp = RUBY_VM_END_CONTROL_FRAME(ec);
9739 while (cfp < eocfp) {
9740 if (cfp->ep == ep) {
9741 return cfp;
9742 }
9743 cfp = ((cfp)+1);
9744 }
9745 return ((void *)0);
9746 }
9747}static inline
9748const VALUE *
9749rb_vm_ep_local_ep(const VALUE *ep)
9750{
9751 return VM_EP_LEP(ep);
9752}
9753__attribute__ ((__pure__)) static inline const VALUE *VM_CF_LEP(const rb_control_frame_t * const cfp);
9754static inline const VALUE *
9755VM_CF_LEP(const rb_control_frame_t * const cfp)
9756{
9757 return VM_EP_LEP(cfp->ep);
9758}
9759static inline const VALUE *
9760VM_CF_PREV_EP(const rb_control_frame_t * const cfp)
9761{
9762 return VM_ENV_PREV_EP(cfp->ep);
9763}
9764__attribute__ ((__pure__)) static inline VALUE VM_CF_BLOCK_HANDLER(const rb_control_frame_t * const cfp);
9765static inline VALUE
9766VM_CF_BLOCK_HANDLER(const rb_control_frame_t * const cfp)
9767{
9768 const VALUE *ep = VM_CF_LEP(cfp);
9769 return VM_ENV_BLOCK_HANDLER(ep);
9770}static inline
9771int
9772rb_vm_cframe_keyword_p(const rb_control_frame_t *cfp)
9773{
9774 return VM_FRAME_CFRAME_KW_P(cfp);
9775}static inline
9776int
9777rb_vm_cframe_empty_keyword_p(const rb_control_frame_t *cfp)
9778{
9779 return VM_FRAME_CFRAME_EMPTY_KW_P(cfp);
9780}static inline
9781VALUE
9782rb_vm_frame_block_handler(const rb_control_frame_t *cfp)
9783{
9784 return VM_CF_BLOCK_HANDLER(cfp);
9785}
9786static struct rb_captured_block *
9787VM_CFP_TO_CAPTURED_BLOCK(const rb_control_frame_t *cfp)
9788{
9789 ((void)0);
9790 return (struct rb_captured_block *)&cfp->self;
9791}
9792static rb_control_frame_t *
9793VM_CAPTURED_BLOCK_TO_CFP(const struct rb_captured_block *captured)
9794{
9795 rb_control_frame_t *cfp = ((rb_control_frame_t *)((VALUE *)(captured) - 3));
9796 ((void)0);
9797 ((void)0);
9798 return cfp;
9799}
9800static int
9801VM_BH_FROM_CFP_P(VALUE block_handler, const rb_control_frame_t *cfp)
9802{
9803 const struct rb_captured_block *captured = VM_CFP_TO_CAPTURED_BLOCK(cfp);
9804 return ((void *)((block_handler) & ~0x03)) == captured;
9805}
9806static VALUE
9807vm_passed_block_handler(rb_execution_context_t *ec)
9808{
9809 VALUE block_handler = ec->passed_block_handler;
9810 ec->passed_block_handler = 0;
9811 vm_block_handler_verify(block_handler);
9812 return block_handler;
9813}
9814static rb_cref_t *
9815vm_cref_new0(VALUE klass, rb_method_visibility_t visi, int module_func, rb_cref_t *prev_cref, int pushed_by_eval, int use_prev_prev)
9816{
9817 VALUE refinements = ((VALUE)RUBY_Qnil);
9818 int omod_shared = 0;
9819 rb_cref_t *cref;
9820 union {
9822 VALUE value;
9823 } scope_visi;
9824 scope_visi.visi.method_visi = visi;
9825 scope_visi.visi.module_func = module_func;
9826 if (prev_cref != ((void *)0) && prev_cref != (void *)1 ) {
9827 refinements = CREF_REFINEMENTS(prev_cref);
9828 if (!!((VALUE)(refinements) != ((VALUE)RUBY_Qnil))) {
9829 omod_shared = 1;
9830 CREF_OMOD_SHARED_SET(prev_cref);
9831 }
9832 }
9833 cref = (rb_cref_t *)rb_imemo_new(imemo_cref, klass, (VALUE)(use_prev_prev ? CREF_NEXT(prev_cref) : prev_cref), scope_visi.value, refinements);
9834 if (pushed_by_eval) CREF_PUSHED_BY_EVAL_SET(cref);
9835 if (omod_shared) CREF_OMOD_SHARED_SET(cref);
9836 return cref;
9837}
9838static rb_cref_t *
9839vm_cref_new(VALUE klass, rb_method_visibility_t visi, int module_func, rb_cref_t *prev_cref, int pushed_by_eval)
9840{
9841 return vm_cref_new0(klass, visi, module_func, prev_cref, pushed_by_eval, 0);
9842}
9843static rb_cref_t *
9844vm_cref_new_use_prev(VALUE klass, rb_method_visibility_t visi, int module_func, rb_cref_t *prev_cref, int pushed_by_eval)
9845{
9846 return vm_cref_new0(klass, visi, module_func, prev_cref, pushed_by_eval, 1);
9847}
9848static int
9849ref_delete_symkey(VALUE key, VALUE value, VALUE unused)
9850{
9851 return ((((VALUE)(key)&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG)||(!(((VALUE)(key) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(key) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(key))->flags & RUBY_T_MASK) == (RUBY_T_SYMBOL))) ? ST_DELETE : ST_CONTINUE;
9852}
9853static rb_cref_t *
9854vm_cref_dup(const rb_cref_t *cref)
9855{
9856 VALUE klass = CREF_CLASS(cref);
9857 const rb_scope_visibility_t *visi = CREF_SCOPE_VISI(cref);
9858 rb_cref_t *next_cref = CREF_NEXT(cref), *new_cref;
9859 int pushed_by_eval = CREF_PUSHED_BY_EVAL(cref);
9860 new_cref = vm_cref_new(klass, visi->method_visi, visi->module_func, next_cref, pushed_by_eval);
9861 if (!!((VALUE)(CREF_REFINEMENTS(cref)) != ((VALUE)RUBY_Qnil))) {
9862 VALUE ref = rb_hash_dup(CREF_REFINEMENTS(cref));
9863 rb_hash_foreach(ref, ref_delete_symkey, ((VALUE)RUBY_Qnil));
9864 CREF_REFINEMENTS_SET(new_cref, ref);
9865 CREF_OMOD_SHARED_UNSET(new_cref);
9866 }
9867 return new_cref;
9868}
9869static rb_cref_t *
9870vm_cref_new_toplevel(rb_execution_context_t *ec)
9871{
9872 rb_cref_t *cref = vm_cref_new(rb_cObject, METHOD_VISI_PRIVATE , 0, ((void *)0), 0);
9873 VALUE top_wrapper = rb_ec_thread_ptr(ec)->top_wrapper;
9874 if (top_wrapper) {
9875 cref = vm_cref_new(top_wrapper, METHOD_VISI_PRIVATE, 0, cref, 0);
9876 }
9877 return cref;
9878}static inline
9879rb_cref_t *
9880rb_vm_cref_new_toplevel(void)
9881{
9882 return vm_cref_new_toplevel(rb_current_execution_context());
9883}
9884static void
9885vm_cref_dump(const char *mesg, const rb_cref_t *cref)
9886{
9887 fprintf(stderr, "vm_cref_dump: %s (%p)\n", mesg, (void *)cref);
9888 while (cref) {
9889 fprintf(stderr, "= cref| klass: %s\n", (!(((struct RBasic*)(rb_class_path(CREF_CLASS(cref))))->flags & RSTRING_NOEMBED) ? ((struct RString*)(rb_class_path(CREF_CLASS(cref))))->as.ary : ((struct RString*)(rb_class_path(CREF_CLASS(cref))))->as.heap.ptr));
9890 cref = CREF_NEXT(cref);
9891 }
9892}static inline
9893void
9894rb_vm_block_ep_update(VALUE obj, const struct rb_block *dst, const VALUE *ep)
9895{
9896 *((const VALUE **)&dst->as.captured.ep) = ep;
9897 rb_obj_written((VALUE)(obj), (VALUE)(((VALUE)RUBY_Qundef)), (VALUE)(VM_ENV_ENVVAL(ep)), "./vm.c", 318);
9898}
9899static void
9900vm_bind_update_env(VALUE bindval, rb_binding_t *bind, VALUE envval)
9901{
9902 const rb_env_t *env = (rb_env_t *)envval;
9903 __extension__({
9904 ;
9905 ; typeof(rb_obj_write((VALUE)(bindval), (VALUE *)(&bind->block.as.captured.code.iseq), (VALUE)(env->iseq), "./vm.c", 325)) unaligned_member_access_result = (rb_obj_write((VALUE)(bindval), (VALUE *)(&bind->block.as.captured.code.iseq), (VALUE)(env->iseq), "./vm.c", 325));
9906 ; unaligned_member_access_result; });
9907 rb_vm_block_ep_update(bindval, &bind->block, env->ep);
9908}
9909static VALUE vm_make_env_object(const rb_execution_context_t *ec, rb_control_frame_t *cfp);
9910extern VALUE rb_vm_invoke_bmethod(rb_execution_context_t *ec, rb_proc_t *proc, VALUE self,
9911 int argc, const VALUE *argv, int kw_splat, VALUE block_handler,
9912 const rb_callable_method_entry_t *me);
9913static VALUE vm_invoke_proc(rb_execution_context_t *ec, rb_proc_t *proc, VALUE self, int argc, const VALUE *argv, int kw_splat, VALUE block_handler);
9914enum rb_debug_counter_type {
9915RB_DEBUG_COUNTER_mc_inline_hit,
9916RB_DEBUG_COUNTER_mc_inline_miss,
9917RB_DEBUG_COUNTER_mc_global_hit,
9918RB_DEBUG_COUNTER_mc_global_miss,
9919RB_DEBUG_COUNTER_mc_global_state_miss,
9920RB_DEBUG_COUNTER_mc_class_serial_miss,
9921RB_DEBUG_COUNTER_mc_cme_complement,
9922RB_DEBUG_COUNTER_mc_cme_complement_hit,
9923RB_DEBUG_COUNTER_mc_search_super,
9924RB_DEBUG_COUNTER_mc_miss_by_nome,
9925RB_DEBUG_COUNTER_mc_miss_by_distinct,
9926RB_DEBUG_COUNTER_mc_miss_by_refine,
9927RB_DEBUG_COUNTER_mc_miss_by_visi,
9928RB_DEBUG_COUNTER_mc_miss_spurious,
9929RB_DEBUG_COUNTER_mc_miss_reuse_call,
9930RB_DEBUG_COUNTER_ccf_general,
9931RB_DEBUG_COUNTER_ccf_iseq_setup,
9932RB_DEBUG_COUNTER_ccf_iseq_setup_0start,
9933RB_DEBUG_COUNTER_ccf_iseq_setup_tailcall_0start,
9934RB_DEBUG_COUNTER_ccf_iseq_fix,
9935RB_DEBUG_COUNTER_ccf_iseq_opt,
9936RB_DEBUG_COUNTER_ccf_iseq_kw1,
9937RB_DEBUG_COUNTER_ccf_iseq_kw2,
9938RB_DEBUG_COUNTER_ccf_cfunc,
9939RB_DEBUG_COUNTER_ccf_ivar,
9940RB_DEBUG_COUNTER_ccf_attrset,
9941RB_DEBUG_COUNTER_ccf_method_missing,
9942RB_DEBUG_COUNTER_ccf_zsuper,
9943RB_DEBUG_COUNTER_ccf_bmethod,
9944RB_DEBUG_COUNTER_ccf_opt_send,
9945RB_DEBUG_COUNTER_ccf_opt_call,
9946RB_DEBUG_COUNTER_ccf_opt_block_call,
9947RB_DEBUG_COUNTER_ccf_super_method,
9948RB_DEBUG_COUNTER_frame_push,
9949RB_DEBUG_COUNTER_frame_push_method,
9950RB_DEBUG_COUNTER_frame_push_block,
9951RB_DEBUG_COUNTER_frame_push_class,
9952RB_DEBUG_COUNTER_frame_push_top,
9953RB_DEBUG_COUNTER_frame_push_cfunc,
9954RB_DEBUG_COUNTER_frame_push_ifunc,
9955RB_DEBUG_COUNTER_frame_push_eval,
9956RB_DEBUG_COUNTER_frame_push_rescue,
9957RB_DEBUG_COUNTER_frame_push_dummy,
9958RB_DEBUG_COUNTER_frame_R2R,
9959RB_DEBUG_COUNTER_frame_R2C,
9960RB_DEBUG_COUNTER_frame_C2C,
9961RB_DEBUG_COUNTER_frame_C2R,
9962RB_DEBUG_COUNTER_ivar_get_ic_hit,
9963RB_DEBUG_COUNTER_ivar_get_ic_miss,
9964RB_DEBUG_COUNTER_ivar_get_ic_miss_serial,
9965RB_DEBUG_COUNTER_ivar_get_ic_miss_unset,
9966RB_DEBUG_COUNTER_ivar_get_ic_miss_noobject,
9967RB_DEBUG_COUNTER_ivar_set_ic_hit,
9968RB_DEBUG_COUNTER_ivar_set_ic_miss,
9969RB_DEBUG_COUNTER_ivar_set_ic_miss_serial,
9970RB_DEBUG_COUNTER_ivar_set_ic_miss_unset,
9971RB_DEBUG_COUNTER_ivar_set_ic_miss_oorange,
9972RB_DEBUG_COUNTER_ivar_set_ic_miss_noobject,
9973RB_DEBUG_COUNTER_ivar_get_base,
9974RB_DEBUG_COUNTER_ivar_set_base,
9975RB_DEBUG_COUNTER_lvar_get,
9976RB_DEBUG_COUNTER_lvar_get_dynamic,
9977RB_DEBUG_COUNTER_lvar_set,
9978RB_DEBUG_COUNTER_lvar_set_dynamic,
9979RB_DEBUG_COUNTER_lvar_set_slowpath,
9980RB_DEBUG_COUNTER_gc_count,
9981RB_DEBUG_COUNTER_gc_minor_newobj,
9982RB_DEBUG_COUNTER_gc_minor_malloc,
9983RB_DEBUG_COUNTER_gc_minor_method,
9984RB_DEBUG_COUNTER_gc_minor_capi,
9985RB_DEBUG_COUNTER_gc_minor_stress,
9986RB_DEBUG_COUNTER_gc_major_nofree,
9987RB_DEBUG_COUNTER_gc_major_oldgen,
9988RB_DEBUG_COUNTER_gc_major_shady,
9989RB_DEBUG_COUNTER_gc_major_force,
9990RB_DEBUG_COUNTER_gc_major_oldmalloc,
9991RB_DEBUG_COUNTER_gc_isptr_trial,
9992RB_DEBUG_COUNTER_gc_isptr_range,
9993RB_DEBUG_COUNTER_gc_isptr_align,
9994RB_DEBUG_COUNTER_gc_isptr_maybe,
9995RB_DEBUG_COUNTER_obj_newobj,
9996RB_DEBUG_COUNTER_obj_newobj_slowpath,
9997RB_DEBUG_COUNTER_obj_newobj_wb_unprotected,
9998RB_DEBUG_COUNTER_obj_free,
9999RB_DEBUG_COUNTER_obj_promote,
10000RB_DEBUG_COUNTER_obj_wb_unprotect,
10001RB_DEBUG_COUNTER_obj_obj_embed,
10002RB_DEBUG_COUNTER_obj_obj_transient,
10003RB_DEBUG_COUNTER_obj_obj_ptr,
10004RB_DEBUG_COUNTER_obj_str_ptr,
10005RB_DEBUG_COUNTER_obj_str_embed,
10006RB_DEBUG_COUNTER_obj_str_shared,
10007RB_DEBUG_COUNTER_obj_str_nofree,
10008RB_DEBUG_COUNTER_obj_str_fstr,
10009RB_DEBUG_COUNTER_obj_ary_embed,
10010RB_DEBUG_COUNTER_obj_ary_transient,
10011RB_DEBUG_COUNTER_obj_ary_ptr,
10012RB_DEBUG_COUNTER_obj_ary_extracapa,
10013RB_DEBUG_COUNTER_obj_ary_shared_create,
10014RB_DEBUG_COUNTER_obj_ary_shared,
10015RB_DEBUG_COUNTER_obj_ary_shared_root_occupied,
10016RB_DEBUG_COUNTER_obj_hash_empty,
10017RB_DEBUG_COUNTER_obj_hash_1,
10018RB_DEBUG_COUNTER_obj_hash_2,
10019RB_DEBUG_COUNTER_obj_hash_3,
10020RB_DEBUG_COUNTER_obj_hash_4,
10021RB_DEBUG_COUNTER_obj_hash_5_8,
10022RB_DEBUG_COUNTER_obj_hash_g8,
10023RB_DEBUG_COUNTER_obj_hash_null,
10024RB_DEBUG_COUNTER_obj_hash_ar,
10025RB_DEBUG_COUNTER_obj_hash_st,
10026RB_DEBUG_COUNTER_obj_hash_transient,
10027RB_DEBUG_COUNTER_obj_hash_force_convert,
10028RB_DEBUG_COUNTER_obj_struct_embed,
10029RB_DEBUG_COUNTER_obj_struct_transient,
10030RB_DEBUG_COUNTER_obj_struct_ptr,
10031RB_DEBUG_COUNTER_obj_data_empty,
10032RB_DEBUG_COUNTER_obj_data_xfree,
10033RB_DEBUG_COUNTER_obj_data_imm_free,
10034RB_DEBUG_COUNTER_obj_data_zombie,
10035RB_DEBUG_COUNTER_obj_match_under4,
10036RB_DEBUG_COUNTER_obj_match_ge4,
10037RB_DEBUG_COUNTER_obj_match_ge8,
10038RB_DEBUG_COUNTER_obj_match_ptr,
10039RB_DEBUG_COUNTER_obj_iclass_ptr,
10040RB_DEBUG_COUNTER_obj_class_ptr,
10041RB_DEBUG_COUNTER_obj_module_ptr,
10042RB_DEBUG_COUNTER_obj_bignum_ptr,
10043RB_DEBUG_COUNTER_obj_bignum_embed,
10044RB_DEBUG_COUNTER_obj_float,
10045RB_DEBUG_COUNTER_obj_complex,
10046RB_DEBUG_COUNTER_obj_rational,
10047RB_DEBUG_COUNTER_obj_regexp_ptr,
10048RB_DEBUG_COUNTER_obj_file_ptr,
10049RB_DEBUG_COUNTER_obj_symbol,
10050RB_DEBUG_COUNTER_obj_imemo_ment,
10051RB_DEBUG_COUNTER_obj_imemo_iseq,
10052RB_DEBUG_COUNTER_obj_imemo_env,
10053RB_DEBUG_COUNTER_obj_imemo_tmpbuf,
10054RB_DEBUG_COUNTER_obj_imemo_ast,
10055RB_DEBUG_COUNTER_obj_imemo_cref,
10056RB_DEBUG_COUNTER_obj_imemo_svar,
10057RB_DEBUG_COUNTER_obj_imemo_throw_data,
10058RB_DEBUG_COUNTER_obj_imemo_ifunc,
10059RB_DEBUG_COUNTER_obj_imemo_memo,
10060RB_DEBUG_COUNTER_obj_imemo_parser_strterm,
10061RB_DEBUG_COUNTER_artable_hint_hit,
10062RB_DEBUG_COUNTER_artable_hint_miss,
10063RB_DEBUG_COUNTER_artable_hint_notfound,
10064RB_DEBUG_COUNTER_heap_xmalloc,
10065RB_DEBUG_COUNTER_heap_xrealloc,
10066RB_DEBUG_COUNTER_heap_xfree,
10067RB_DEBUG_COUNTER_theap_alloc,
10068RB_DEBUG_COUNTER_theap_alloc_fail,
10069RB_DEBUG_COUNTER_theap_evacuate,
10070RB_DEBUG_COUNTER_mjit_exec,
10071RB_DEBUG_COUNTER_mjit_exec_not_added,
10072RB_DEBUG_COUNTER_mjit_exec_not_added_add_iseq,
10073RB_DEBUG_COUNTER_mjit_exec_not_ready,
10074RB_DEBUG_COUNTER_mjit_exec_not_compiled,
10075RB_DEBUG_COUNTER_mjit_exec_call_func,
10076RB_DEBUG_COUNTER_mjit_frame_VM2VM,
10077RB_DEBUG_COUNTER_mjit_frame_VM2JT,
10078RB_DEBUG_COUNTER_mjit_frame_JT2JT,
10079RB_DEBUG_COUNTER_mjit_frame_JT2VM,
10080RB_DEBUG_COUNTER_mjit_cancel,
10081RB_DEBUG_COUNTER_mjit_cancel_ivar_inline,
10082RB_DEBUG_COUNTER_mjit_cancel_send_inline,
10083RB_DEBUG_COUNTER_mjit_cancel_opt_insn,
10084RB_DEBUG_COUNTER_mjit_cancel_invalidate_all,
10085RB_DEBUG_COUNTER_mjit_length_unit_queue,
10086RB_DEBUG_COUNTER_mjit_length_active_units,
10087RB_DEBUG_COUNTER_mjit_length_compact_units,
10088RB_DEBUG_COUNTER_mjit_length_stale_units,
10089RB_DEBUG_COUNTER_mjit_compile_failures,
10090 RB_DEBUG_COUNTER_MAX
10091};
10092void rb_debug_counter_show_results(const char *msg);
10093
10094
10095size_t ruby_debug_counter_get(const char **names_ptr, size_t *counters_ptr);
10096void ruby_debug_counter_reset(void);
10097void ruby_debug_counter_show_at_exit(int enable);
10098
10099
10100enum rb_mjit_iseq_func {
10101 NOT_ADDED_JIT_ISEQ_FUNC = 0,
10102 NOT_READY_JIT_ISEQ_FUNC = 1,
10103 NOT_COMPILED_JIT_ISEQ_FUNC = 2,
10104 LAST_JIT_ISEQ_FUNC = 3
10105};
10106struct mjit_options {
10107 char on;
10108 char save_temps;
10109 char warnings;
10110 char debug;
10111 char* debug_flags;
10112 unsigned int wait;
10113 unsigned int min_calls;
10114 int verbose;
10115 int max_cache_size;
10116};
10118 _Bool disable_ivar_cache;
10119 _Bool disable_send_cache;
10120 _Bool disable_inlining;
10121};
10122typedef VALUE (*mjit_func_t)(rb_execution_context_t *, rb_control_frame_t *);
10123
10124
10125extern struct mjit_options mjit_opts;
10126extern _Bool mjit_call_p;
10127extern void rb_mjit_add_iseq_to_process(const rb_iseq_t *iseq);
10128extern VALUE rb_mjit_wait_call(rb_execution_context_t *ec, struct rb_iseq_constant_body *body);
10129extern struct rb_mjit_compile_info* rb_mjit_iseq_compile_info(const struct rb_iseq_constant_body *body);
10130extern void rb_mjit_recompile_iseq(const rb_iseq_t *iseq);
10131
10132
10133extern _Bool mjit_compile(FILE *f, const rb_iseq_t *iseq, const char *funcname);
10134extern void mjit_init(const struct mjit_options *opts);
10135extern void mjit_gc_start_hook(void);
10136extern void mjit_gc_exit_hook(void);
10137extern void mjit_free_iseq(const rb_iseq_t *iseq);
10138extern void mjit_update_references(const rb_iseq_t *iseq);
10139extern void mjit_mark(void);
10140extern struct mjit_cont *mjit_cont_new(rb_execution_context_t *ec);
10141extern void mjit_cont_free(struct mjit_cont *cont);
10142extern void mjit_add_class_serial(rb_serial_t class_serial);
10143extern void mjit_remove_class_serial(rb_serial_t class_serial);
10144static inline int
10145mjit_target_iseq_p(struct rb_iseq_constant_body *body)
10146{
10147 return (body->type == ISEQ_TYPE_METHOD || body->type == ISEQ_TYPE_BLOCK)
10148 && body->iseq_size < 1000;
10149}
10150static inline VALUE
10151mjit_exec(rb_execution_context_t *ec)
10152{
10153 const rb_iseq_t *iseq;
10154 struct rb_iseq_constant_body *body;
10155 long unsigned total_calls;
10156 mjit_func_t func;
10157 if (!mjit_call_p)
10158 return ((VALUE)RUBY_Qundef);
10159 ((void)0);
10160 iseq = ec->cfp->iseq;
10161 body = iseq->body;
10162 total_calls = ++body->total_calls;
10163 func = body->jit_func;
10164 if ((__builtin_expect(!!((uintptr_t)func <= (uintptr_t)LAST_JIT_ISEQ_FUNC), 0))) {
10165 ((void)0);
10166 switch ((enum rb_mjit_iseq_func)func) {
10167 case NOT_ADDED_JIT_ISEQ_FUNC:
10168 ((void)0);
10169 if (total_calls == mjit_opts.min_calls && mjit_target_iseq_p(body)) {
10170 ((void)0);
10171 rb_mjit_add_iseq_to_process(iseq);
10172 if ((__builtin_expect(!!(mjit_opts.wait), 0))) {
10173 return rb_mjit_wait_call(ec, body);
10174 }
10175 }
10176 return ((VALUE)RUBY_Qundef);
10177 case NOT_READY_JIT_ISEQ_FUNC:
10178 ((void)0);
10179 return ((VALUE)RUBY_Qundef);
10180 case NOT_COMPILED_JIT_ISEQ_FUNC:
10181 ((void)0);
10182 return ((VALUE)RUBY_Qundef);
10183 default:
10184 break;
10185 }
10186 }
10187 ((void)0);
10188 ((void)0);
10189 return func(ec, ec->cfp);
10190}
10191void mjit_child_after_fork(void);
10192
10193
10194extern VALUE ruby_vm_const_missing_count;
10195extern rb_serial_t ruby_vm_global_method_state;
10196extern rb_serial_t ruby_vm_global_constant_state;
10197extern rb_serial_t ruby_vm_class_serial;
10198
10199
10200static inline void
10201CC_SET_FASTPATH(CALL_CACHE cc, vm_call_handler func, _Bool enabled)
10202{
10203 if ((__builtin_expect(!!(enabled), 1))) {
10204 cc->call = func;
10205 }
10206}
10207static inline void
10208CC_SET_ME(CALL_CACHE cc, const rb_callable_method_entry_t *me)
10209{
10210 cc->me = me;
10211 cc->method_serial = me ? me->def->method_serial : 0;
10212}
10213static inline struct vm_throw_data *
10214THROW_DATA_NEW(VALUE val, const rb_control_frame_t *cf, int st)
10215{
10216 struct vm_throw_data *obj = (struct vm_throw_data *)rb_imemo_new(imemo_throw_data, val, (VALUE)cf, 0, 0);
10217 obj->throw_state = st;
10218 return obj;
10219}
10220static inline VALUE
10221THROW_DATA_VAL(const struct vm_throw_data *obj)
10222{
10223 ((void)0);
10224 return obj->throw_obj;
10225}
10226static inline const rb_control_frame_t *
10227THROW_DATA_CATCH_FRAME(const struct vm_throw_data *obj)
10228{
10229 ((void)0);
10230 return obj->catch_frame;
10231}
10232static inline int
10233THROW_DATA_STATE(const struct vm_throw_data *obj)
10234{
10235 ((void)0);
10236 return obj->throw_state;
10237}
10238static inline int
10239THROW_DATA_CONSUMED_P(const struct vm_throw_data *obj)
10240{
10241 ((void)0);
10242 return obj->flags & ((VALUE)RUBY_FL_USER4);
10243}
10244static inline void
10245THROW_DATA_CATCH_FRAME_SET(struct vm_throw_data *obj, const rb_control_frame_t *cfp)
10246{
10247 ((void)0);
10248 obj->catch_frame = cfp;
10249}
10250static inline void
10251THROW_DATA_STATE_SET(struct vm_throw_data *obj, int st)
10252{
10253 ((void)0);
10254 obj->throw_state = st;
10255}
10256static inline void
10257THROW_DATA_CONSUMED_SET(struct vm_throw_data *obj)
10258{
10259 if (( ((RUBY_T_IMEMO) == RUBY_T_FIXNUM) ? (((int)(long)((VALUE)(obj)))&RUBY_FIXNUM_FLAG) : ((RUBY_T_IMEMO) == RUBY_T_TRUE) ? (((VALUE)(obj)) == ((VALUE)RUBY_Qtrue)) : ((RUBY_T_IMEMO) == RUBY_T_FALSE) ? (((VALUE)(obj)) == ((VALUE)RUBY_Qfalse)) : ((RUBY_T_IMEMO) == RUBY_T_NIL) ? (((VALUE)(obj)) == ((VALUE)RUBY_Qnil)) : ((RUBY_T_IMEMO) == RUBY_T_UNDEF) ? (((VALUE)(obj)) == ((VALUE)RUBY_Qundef)) : ((RUBY_T_IMEMO) == RUBY_T_SYMBOL) ? ((((VALUE)((VALUE)(obj))&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG)||(!(((VALUE)((VALUE)(obj)) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)((VALUE)(obj)) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)((VALUE)(obj)))->flags & RUBY_T_MASK) == (RUBY_T_SYMBOL))) : ((RUBY_T_IMEMO) == RUBY_T_FLOAT) ? ( ((((int)(long)((VALUE)(obj)))&RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG) || (!(((VALUE)((VALUE)(obj)) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)((VALUE)(obj)) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)((VALUE)(obj)))->flags & RUBY_T_MASK) == RUBY_T_FLOAT)) : (!(((VALUE)((VALUE)(obj)) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)((VALUE)(obj)) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)((VALUE)(obj)))->flags & RUBY_T_MASK) == (RUBY_T_IMEMO))) &&
10260 THROW_DATA_STATE(obj) == RUBY_TAG_BREAK) {
10261 obj->flags |= ((VALUE)RUBY_FL_USER4);
10262 }
10263}
10264static _Bool
10265vm_call_iseq_optimizable_p(const struct rb_call_info *ci, const struct rb_call_cache *cc)
10266{
10267 return !((ci)->flag & (0x01 << VM_CALL_ARGS_SPLAT_bit)) && !((ci)->flag & (0x01 << VM_CALL_KWARG_bit)) &&
10268 !((rb_method_visibility_t)(((cc->me)->flags & (((VALUE)RUBY_FL_USER4) | ((VALUE)RUBY_FL_USER5))) >> ((((VALUE)RUBY_FL_USHIFT) + 4)+0)) == METHOD_VISI_PROTECTED);
10269}
10270typedef long OFFSET;
10271typedef unsigned long lindex_t;
10272typedef VALUE GENTRY;
10273typedef rb_iseq_t *ISEQ;
10274enum ruby_vminsn_type {
10275 YARVINSN_nop,
10276 YARVINSN_getlocal,
10277 YARVINSN_setlocal,
10278 YARVINSN_getblockparam,
10279 YARVINSN_setblockparam,
10280 YARVINSN_getblockparamproxy,
10281 YARVINSN_getspecial,
10282 YARVINSN_setspecial,
10283 YARVINSN_getinstancevariable,
10284 YARVINSN_setinstancevariable,
10285 YARVINSN_getclassvariable,
10286 YARVINSN_setclassvariable,
10287 YARVINSN_getconstant,
10288 YARVINSN_setconstant,
10289 YARVINSN_getglobal,
10290 YARVINSN_setglobal,
10291 YARVINSN_putnil,
10292 YARVINSN_putself,
10293 YARVINSN_putobject,
10294 YARVINSN_putspecialobject,
10295 YARVINSN_putstring,
10296 YARVINSN_concatstrings,
10297 YARVINSN_tostring,
10298 YARVINSN_freezestring,
10299 YARVINSN_toregexp,
10300 YARVINSN_intern,
10301 YARVINSN_newarray,
10302 YARVINSN_newarraykwsplat,
10303 YARVINSN_duparray,
10304 YARVINSN_duphash,
10305 YARVINSN_expandarray,
10306 YARVINSN_concatarray,
10307 YARVINSN_splatarray,
10308 YARVINSN_newhash,
10309 YARVINSN_newrange,
10310 YARVINSN_pop,
10311 YARVINSN_dup,
10312 YARVINSN_dupn,
10313 YARVINSN_swap,
10314 YARVINSN_reverse,
10315 YARVINSN_topn,
10316 YARVINSN_setn,
10317 YARVINSN_adjuststack,
10318 YARVINSN_defined,
10319 YARVINSN_checkmatch,
10320 YARVINSN_checkkeyword,
10321 YARVINSN_checktype,
10322 YARVINSN_defineclass,
10323 YARVINSN_definemethod,
10324 YARVINSN_definesmethod,
10325 YARVINSN_send,
10326 YARVINSN_opt_send_without_block,
10327 YARVINSN_opt_str_freeze,
10328 YARVINSN_opt_nil_p,
10329 YARVINSN_opt_str_uminus,
10330 YARVINSN_opt_newarray_max,
10331 YARVINSN_opt_newarray_min,
10332 YARVINSN_invokesuper,
10333 YARVINSN_invokeblock,
10334 YARVINSN_leave,
10335 YARVINSN_throw,
10336 YARVINSN_jump,
10337 YARVINSN_branchif,
10338 YARVINSN_branchunless,
10339 YARVINSN_branchnil,
10340 YARVINSN_opt_getinlinecache,
10341 YARVINSN_opt_setinlinecache,
10342 YARVINSN_once,
10343 YARVINSN_opt_case_dispatch,
10344 YARVINSN_opt_plus,
10345 YARVINSN_opt_minus,
10346 YARVINSN_opt_mult,
10347 YARVINSN_opt_div,
10348 YARVINSN_opt_mod,
10349 YARVINSN_opt_eq,
10350 YARVINSN_opt_neq,
10351 YARVINSN_opt_lt,
10352 YARVINSN_opt_le,
10353 YARVINSN_opt_gt,
10354 YARVINSN_opt_ge,
10355 YARVINSN_opt_ltlt,
10356 YARVINSN_opt_and,
10357 YARVINSN_opt_or,
10358 YARVINSN_opt_aref,
10359 YARVINSN_opt_aset,
10360 YARVINSN_opt_aset_with,
10361 YARVINSN_opt_aref_with,
10362 YARVINSN_opt_length,
10363 YARVINSN_opt_size,
10364 YARVINSN_opt_empty_p,
10365 YARVINSN_opt_succ,
10366 YARVINSN_opt_not,
10367 YARVINSN_opt_regexpmatch2,
10368 YARVINSN_opt_call_c_function,
10369 YARVINSN_invokebuiltin,
10370 YARVINSN_opt_invokebuiltin_delegate,
10371 YARVINSN_opt_invokebuiltin_delegate_leave,
10372 YARVINSN_getlocal_WC_0,
10373 YARVINSN_getlocal_WC_1,
10374 YARVINSN_setlocal_WC_0,
10375 YARVINSN_setlocal_WC_1,
10376 YARVINSN_putobject_INT2FIX_0_,
10377 YARVINSN_putobject_INT2FIX_1_,
10378 YARVINSN_trace_nop,
10379 YARVINSN_trace_getlocal,
10380 YARVINSN_trace_setlocal,
10381 YARVINSN_trace_getblockparam,
10382 YARVINSN_trace_setblockparam,
10383 YARVINSN_trace_getblockparamproxy,
10384 YARVINSN_trace_getspecial,
10385 YARVINSN_trace_setspecial,
10386 YARVINSN_trace_getinstancevariable,
10387 YARVINSN_trace_setinstancevariable,
10388 YARVINSN_trace_getclassvariable,
10389 YARVINSN_trace_setclassvariable,
10390 YARVINSN_trace_getconstant,
10391 YARVINSN_trace_setconstant,
10392 YARVINSN_trace_getglobal,
10393 YARVINSN_trace_setglobal,
10394 YARVINSN_trace_putnil,
10395 YARVINSN_trace_putself,
10396 YARVINSN_trace_putobject,
10397 YARVINSN_trace_putspecialobject,
10398 YARVINSN_trace_putstring,
10399 YARVINSN_trace_concatstrings,
10400 YARVINSN_trace_tostring,
10401 YARVINSN_trace_freezestring,
10402 YARVINSN_trace_toregexp,
10403 YARVINSN_trace_intern,
10404 YARVINSN_trace_newarray,
10405 YARVINSN_trace_newarraykwsplat,
10406 YARVINSN_trace_duparray,
10407 YARVINSN_trace_duphash,
10408 YARVINSN_trace_expandarray,
10409 YARVINSN_trace_concatarray,
10410 YARVINSN_trace_splatarray,
10411 YARVINSN_trace_newhash,
10412 YARVINSN_trace_newrange,
10413 YARVINSN_trace_pop,
10414 YARVINSN_trace_dup,
10415 YARVINSN_trace_dupn,
10416 YARVINSN_trace_swap,
10417 YARVINSN_trace_reverse,
10418 YARVINSN_trace_topn,
10419 YARVINSN_trace_setn,
10420 YARVINSN_trace_adjuststack,
10421 YARVINSN_trace_defined,
10422 YARVINSN_trace_checkmatch,
10423 YARVINSN_trace_checkkeyword,
10424 YARVINSN_trace_checktype,
10425 YARVINSN_trace_defineclass,
10426 YARVINSN_trace_definemethod,
10427 YARVINSN_trace_definesmethod,
10428 YARVINSN_trace_send,
10429 YARVINSN_trace_opt_send_without_block,
10430 YARVINSN_trace_opt_str_freeze,
10431 YARVINSN_trace_opt_nil_p,
10432 YARVINSN_trace_opt_str_uminus,
10433 YARVINSN_trace_opt_newarray_max,
10434 YARVINSN_trace_opt_newarray_min,
10435 YARVINSN_trace_invokesuper,
10436 YARVINSN_trace_invokeblock,
10437 YARVINSN_trace_leave,
10438 YARVINSN_trace_throw,
10439 YARVINSN_trace_jump,
10440 YARVINSN_trace_branchif,
10441 YARVINSN_trace_branchunless,
10442 YARVINSN_trace_branchnil,
10443 YARVINSN_trace_opt_getinlinecache,
10444 YARVINSN_trace_opt_setinlinecache,
10445 YARVINSN_trace_once,
10446 YARVINSN_trace_opt_case_dispatch,
10447 YARVINSN_trace_opt_plus,
10448 YARVINSN_trace_opt_minus,
10449 YARVINSN_trace_opt_mult,
10450 YARVINSN_trace_opt_div,
10451 YARVINSN_trace_opt_mod,
10452 YARVINSN_trace_opt_eq,
10453 YARVINSN_trace_opt_neq,
10454 YARVINSN_trace_opt_lt,
10455 YARVINSN_trace_opt_le,
10456 YARVINSN_trace_opt_gt,
10457 YARVINSN_trace_opt_ge,
10458 YARVINSN_trace_opt_ltlt,
10459 YARVINSN_trace_opt_and,
10460 YARVINSN_trace_opt_or,
10461 YARVINSN_trace_opt_aref,
10462 YARVINSN_trace_opt_aset,
10463 YARVINSN_trace_opt_aset_with,
10464 YARVINSN_trace_opt_aref_with,
10465 YARVINSN_trace_opt_length,
10466 YARVINSN_trace_opt_size,
10467 YARVINSN_trace_opt_empty_p,
10468 YARVINSN_trace_opt_succ,
10469 YARVINSN_trace_opt_not,
10470 YARVINSN_trace_opt_regexpmatch2,
10471 YARVINSN_trace_opt_call_c_function,
10472 YARVINSN_trace_invokebuiltin,
10473 YARVINSN_trace_opt_invokebuiltin_delegate,
10474 YARVINSN_trace_opt_invokebuiltin_delegate_leave,
10475 YARVINSN_trace_getlocal_WC_0,
10476 YARVINSN_trace_getlocal_WC_1,
10477 YARVINSN_trace_setlocal_WC_0,
10478 YARVINSN_trace_setlocal_WC_1,
10479 YARVINSN_trace_putobject_INT2FIX_0_,
10480 YARVINSN_trace_putobject_INT2FIX_1_,
10481 VM_INSTRUCTION_SIZE
10482};
10483typedef enum {
10484 CONST_DEPRECATED = 0x100,
10485 CONST_VISIBILITY_MASK = 0xff,
10486 CONST_PUBLIC = 0x00,
10487 CONST_PRIVATE,
10488 CONST_VISIBILITY_MAX
10489} rb_const_flag_t;
10490typedef struct rb_const_entry_struct {
10491 rb_const_flag_t flag;
10492 int line;
10493 VALUE value;
10494 VALUE file;
10496VALUE rb_mod_private_constant(int argc, const VALUE *argv, VALUE obj);
10497VALUE rb_mod_public_constant(int argc, const VALUE *argv, VALUE obj);
10498VALUE rb_mod_deprecate_constant(int argc, const VALUE *argv, VALUE obj);
10499void rb_free_const_table(struct rb_id_table *tbl);
10500VALUE rb_public_const_get_at(VALUE klass, ID id);
10501VALUE rb_public_const_get_from(VALUE klass, ID id);
10502int rb_public_const_defined_from(VALUE klass, ID id);
10503rb_const_entry_t *rb_const_lookup(VALUE klass, ID id);
10504int rb_autoloading_value(VALUE mod, ID id, VALUE *value, rb_const_flag_t *flag);
10505VALUE rb_const_source_location(VALUE, ID);
10506VALUE rb_const_source_location_at(VALUE, ID);
10508 uint32_t numiv;
10509 VALUE ivptr[];
10510};
10511struct st_table *rb_ivar_generic_ivtbl(void);
10512extern rb_method_definition_t *rb_method_definition_create(rb_method_type_t type, ID mid);
10513extern void rb_method_definition_set(const rb_method_entry_t *me, rb_method_definition_t *def, void *opts);
10514extern int rb_method_definition_eq(const rb_method_definition_t *d1, const rb_method_definition_t *d2);
10515extern VALUE rb_make_no_method_exception(VALUE exc, VALUE format, VALUE obj,
10516 int argc, const VALUE *argv, int priv);
10517static rb_control_frame_t *vm_get_ruby_level_caller_cfp(const rb_execution_context_t *ec, const rb_control_frame_t *cfp);
10518static VALUE
10519ruby_vm_special_exception_copy(VALUE exc)
10520{
10521 VALUE e = rb_obj_alloc(rb_class_real((((struct RBasic*)(exc))->klass)));
10522 rb_obj_copy_ivar(e, exc);
10523 return e;
10524}
10525__attribute__ ((__noreturn__)) static void ec_stack_overflow(rb_execution_context_t *ec, int);
10526static void
10527ec_stack_overflow(rb_execution_context_t *ec, int setup)
10528{
10529 VALUE mesg = rb_ec_vm_ptr(ec)->special_exceptions[ruby_error_sysstack];
10530 ec->raised_flag = RAISED_STACKOVERFLOW;
10531 if (setup) {
10532 VALUE at = rb_ec_backtrace_object(ec);
10533 mesg = ruby_vm_special_exception_copy(mesg);
10534 rb_ivar_set(mesg, idBt, at);
10535 rb_ivar_set(mesg, idBt_locations, at);
10536 }
10537 ec->errinfo = mesg;
10538 rb_ec_tag_jump(ec, RUBY_TAG_RAISE);
10539}
10540__attribute__ ((__noreturn__)) static void vm_stackoverflow(void);
10541static void
10542vm_stackoverflow(void)
10543{
10544 ec_stack_overflow(rb_current_execution_context(), 1);
10545}
10546__attribute__ ((__noreturn__)) static void rb_ec_stack_overflow(rb_execution_context_t *ec, int crit);
10547static void
10548rb_ec_stack_overflow(rb_execution_context_t *ec, int crit)
10549{
10550 if (crit || rb_during_gc()) {
10551 ec->raised_flag = RAISED_STACKOVERFLOW;
10552 ec->errinfo = rb_ec_vm_ptr(ec)->special_exceptions[ruby_error_stackfatal];
10553 rb_ec_tag_jump(ec, RUBY_TAG_RAISE);
10554 }
10555 ec_stack_overflow(ec, 1);
10556}
10557static inline rb_control_frame_t *
10558vm_push_frame(rb_execution_context_t *ec,
10559 const rb_iseq_t *iseq,
10560 VALUE type,
10561 VALUE self,
10562 VALUE specval,
10563 VALUE cref_or_me,
10564 const VALUE *pc,
10565 VALUE *sp,
10566 int local_size,
10567 int stack_max)
10568{
10569 rb_control_frame_t *const cfp = ((ec->cfp)-1);
10570 ;
10571 ((void)0);
10572 if ((__builtin_expect(!!(!(!(1/!!(sizeof(*(sp)) == sizeof(VALUE))) || !(1/!!(sizeof(*(cfp)) == sizeof(rb_control_frame_t))) || ((rb_control_frame_t *)((sp) + (local_size + stack_max)) + 1) >= (cfp))), 1))) {(void)0;} else vm_stackoverflow();
10573 ;
10574 ec->cfp = cfp;
10575 cfp->pc = (VALUE *)pc;
10576 cfp->iseq = (rb_iseq_t *)iseq;
10577 cfp->self = self;
10578 cfp->block_code = ((void *)0);
10579 for (int i=0; i < local_size; i++) {
10580 *sp++ = ((VALUE)RUBY_Qnil);
10581 }
10582 ((void)0);
10583 ((void)0);
10584 ((void)0);
10585 *sp++ = cref_or_me;
10586 *sp++ = specval ;
10587 *sp = type;
10588 cfp->ep = sp;
10589 cfp->__bp__ = cfp->sp = sp + 1;
10590 if (0 == 2) {
10591 rb_vmdebug_stack_dump_raw(rb_current_execution_context(), rb_current_execution_context()->cfp);
10592 }
10593 return cfp;
10594}
10595static inline int
10596vm_pop_frame(rb_execution_context_t *ec, rb_control_frame_t *cfp, const VALUE *ep)
10597{
10598 VALUE flags = ep[( 0)];
10599 if ((((0) > 0) ? (0) : 0) >= 4) rb_gc_verify_internal_consistency();
10600 if (0 == 2) rb_vmdebug_stack_dump_raw(rb_current_execution_context(), rb_current_execution_context()->cfp);
10601 rb_vm_check_ints(ec);
10602 ec->cfp = ((cfp)+1);
10603 return flags & VM_FRAME_FLAG_FINISH;
10604}
10605static void
10606rb_vm_pop_frame(rb_execution_context_t *ec)
10607{
10608 vm_pop_frame(ec, ec->cfp, ec->cfp->ep);
10609}
10610static inline VALUE
10611rb_arity_error_new(int argc, int min, int max)
10612{
10613 VALUE err_mess = 0;
10614 if (min == max) {
10615 err_mess = rb_sprintf("wrong number of arguments (given %d, expected %d)", argc, min);
10616 }
10617 else if (max == (-1)) {
10618 err_mess = rb_sprintf("wrong number of arguments (given %d, expected %d+)", argc, min);
10619 }
10620 else {
10621 err_mess = rb_sprintf("wrong number of arguments (given %d, expected %d..%d)", argc, min, max);
10622 }
10623 return rb_exc_new_str(rb_eArgError, err_mess);
10624}
10625static void
10626rb_error_arity(int argc, int min, int max)
10627{
10628 rb_exc_raise(rb_arity_error_new(argc, min, max));
10629}
10630__attribute__ ((__noinline__)) static void vm_env_write_slowpath(const VALUE *ep, int index, VALUE v);
10631static void
10632vm_env_write_slowpath(const VALUE *ep, int index, VALUE v)
10633{
10634 rb_gc_writebarrier_remember(VM_ENV_ENVVAL(ep));
10635 VM_FORCE_WRITE(&ep[index], v);
10636 VM_ENV_FLAGS_UNSET(ep, VM_ENV_FLAG_WB_REQUIRED);
10637 ((void)0);
10638}
10639static inline void
10640vm_env_write(const VALUE *ep, int index, VALUE v)
10641{
10642 VALUE flags = ep[( 0)];
10643 if ((__builtin_expect(!!((flags & VM_ENV_FLAG_WB_REQUIRED) == 0), 1))) {
10644 VM_STACK_ENV_WRITE(ep, index, v);
10645 }
10646 else {
10647 vm_env_write_slowpath(ep, index, v);
10648 }
10649}
10650static VALUE
10651rb_vm_bh_to_procval(const rb_execution_context_t *ec, VALUE block_handler)
10652{
10653 if (block_handler == 0) {
10654 return ((VALUE)RUBY_Qnil);
10655 }
10656 else {
10657 switch (vm_block_handler_type(block_handler)) {
10658 case block_handler_type_iseq:
10659 case block_handler_type_ifunc:
10660 return rb_vm_make_proc(ec, VM_BH_TO_CAPT_BLOCK(block_handler), rb_cProc);
10661 case block_handler_type_symbol:
10662 return rb_sym_to_proc(VM_BH_TO_SYMBOL(block_handler));
10663 case block_handler_type_proc:
10664 return VM_BH_TO_PROC(block_handler);
10665 default:
10666 __builtin_unreachable();
10667 }
10668 }
10669}
10670static inline struct vm_svar *
10671lep_svar(const rb_execution_context_t *ec, const VALUE *lep)
10672{
10673 VALUE svar;
10674 if (lep && (ec == ((void *)0) || ec->root_lep != lep)) {
10675 svar = lep[(-2)];
10676 }
10677 else {
10678 svar = ec->root_svar;
10679 }
10680 ((void)0);
10681 return (struct vm_svar *)svar;
10682}
10683static inline void
10684lep_svar_write(const rb_execution_context_t *ec, const VALUE *lep, const struct vm_svar *svar)
10685{
10686 ((void)0);
10687 if (lep && (ec == ((void *)0) || ec->root_lep != lep)) {
10688 vm_env_write(lep, (-2), (VALUE)svar);
10689 }
10690 else {
10691 __extension__({
10692;
10693; typeof(rb_obj_write((VALUE)(rb_ec_thread_ptr(ec)->self), (VALUE *)(&ec->root_svar), (VALUE)(svar), "./vm_insnhelper.c", 486)) unaligned_member_access_result = (rb_obj_write((VALUE)(rb_ec_thread_ptr(ec)->self), (VALUE *)(&ec->root_svar), (VALUE)(svar), "./vm_insnhelper.c", 486));
10694; unaligned_member_access_result; });
10695 }
10696}
10697static VALUE
10698lep_svar_get(const rb_execution_context_t *ec, const VALUE *lep, rb_num_t key)
10699{
10700 const struct vm_svar *svar = lep_svar(ec, lep);
10701 if ((VALUE)svar == ((VALUE)RUBY_Qfalse) || imemo_type((VALUE)svar) != imemo_svar) return ((VALUE)RUBY_Qnil);
10702 switch (key) {
10703 case VM_SVAR_LASTLINE:
10704 return svar->lastline;
10705 case VM_SVAR_BACKREF:
10706 return svar->backref;
10707 default: {
10708 const VALUE ary = svar->others;
10709 if (!((VALUE)(ary) != ((VALUE)RUBY_Qnil))) {
10710 return ((VALUE)RUBY_Qnil);
10711 }
10712 else {
10713 return rb_ary_entry(ary, key - VM_SVAR_EXTRA_START);
10714 }
10715 }
10716 }
10717}
10718static struct vm_svar *
10719svar_new(VALUE obj)
10720{
10721 return (struct vm_svar *)rb_imemo_new(imemo_svar, ((VALUE)RUBY_Qnil), ((VALUE)RUBY_Qnil), ((VALUE)RUBY_Qnil), obj);
10722}
10723static void
10724lep_svar_set(const rb_execution_context_t *ec, const VALUE *lep, rb_num_t key, VALUE val)
10725{
10726 struct vm_svar *svar = lep_svar(ec, lep);
10727 if ((VALUE)svar == ((VALUE)RUBY_Qfalse) || imemo_type((VALUE)svar) != imemo_svar) {
10728 lep_svar_write(ec, lep, svar = svar_new((VALUE)svar));
10729 }
10730 switch (key) {
10731 case VM_SVAR_LASTLINE:
10732 __extension__({
10733;
10734; typeof(rb_obj_write((VALUE)(svar), (VALUE *)(&svar->lastline), (VALUE)(val), "./vm_insnhelper.c", 532)) unaligned_member_access_result = (rb_obj_write((VALUE)(svar), (VALUE *)(&svar->lastline), (VALUE)(val), "./vm_insnhelper.c", 532));
10735; unaligned_member_access_result; });
10736 return;
10737 case VM_SVAR_BACKREF:
10738 __extension__({
10739;
10740; typeof(rb_obj_write((VALUE)(svar), (VALUE *)(&svar->backref), (VALUE)(val), "./vm_insnhelper.c", 535)) unaligned_member_access_result = (rb_obj_write((VALUE)(svar), (VALUE *)(&svar->backref), (VALUE)(val), "./vm_insnhelper.c", 535));
10741; unaligned_member_access_result; });
10742 return;
10743 default: {
10744 VALUE ary = svar->others;
10745 if (!((VALUE)(ary) != ((VALUE)RUBY_Qnil))) {
10746 __extension__({
10747 ;
10748 ; typeof(rb_obj_write((VALUE)(svar), (VALUE *)(&svar->others), (VALUE)(ary = rb_ary_new()), "./vm_insnhelper.c", 541)) unaligned_member_access_result = (rb_obj_write((VALUE)(svar), (VALUE *)(&svar->others), (VALUE)(ary = rb_ary_new()), "./vm_insnhelper.c", 541));
10749 ; unaligned_member_access_result; });
10750 }
10751 rb_ary_store(ary, key - VM_SVAR_EXTRA_START, val);
10752 }
10753 }
10754}
10755static inline VALUE
10756vm_getspecial(const rb_execution_context_t *ec, const VALUE *lep, rb_num_t key, rb_num_t type)
10757{
10758 VALUE val;
10759 if (type == 0) {
10760 val = lep_svar_get(ec, lep, key);
10761 }
10762 else {
10763 VALUE backref = lep_svar_get(ec, lep, VM_SVAR_BACKREF);
10764 if (type & 0x01) {
10765 switch (type >> 1) {
10766 case '&':
10767 val = rb_reg_last_match(backref);
10768 break;
10769 case '`':
10770 val = rb_reg_match_pre(backref);
10771 break;
10772 case '\'':
10773 val = rb_reg_match_post(backref);
10774 break;
10775 case '+':
10776 val = rb_reg_match_last(backref);
10777 break;
10778 default:
10779 rb_bug("unexpected back-ref");
10780 }
10781 }
10782 else {
10783 val = rb_reg_nth_match((int)(type >> 1), backref);
10784 }
10785 }
10786 return val;
10787}
10788__attribute__ ((__pure__)) static rb_callable_method_entry_t *check_method_entry(VALUE obj, int can_be_svar);
10790check_method_entry(VALUE obj, int can_be_svar)
10791{
10792 if (obj == ((VALUE)RUBY_Qfalse)) return ((void *)0);
10793 switch (imemo_type(obj)) {
10794 case imemo_ment:
10795 return (rb_callable_method_entry_t *)obj;
10796 case imemo_cref:
10797 return ((void *)0);
10798 case imemo_svar:
10799 if (can_be_svar) {
10800 return check_method_entry(((struct vm_svar *)obj)->cref_or_me, 0);
10801 }
10802 default:
10803 return ((void *)0);
10804 }
10805}
10806static const rb_callable_method_entry_t *
10807rb_vm_frame_method_entry(const rb_control_frame_t *cfp)
10808{
10809 const VALUE *ep = cfp->ep;
10811 while (!VM_ENV_LOCAL_P(ep)) {
10812 if ((me = check_method_entry(ep[(-2)], 0)) != ((void *)0)) return me;
10813 ep = VM_ENV_PREV_EP(ep);
10814 }
10815 return check_method_entry(ep[(-2)], 1);
10816}
10817static rb_cref_t *
10818method_entry_cref(rb_callable_method_entry_t *me)
10819{
10820 switch (me->def->type) {
10821 case VM_METHOD_TYPE_ISEQ:
10822 return me->def->body.iseq.cref;
10823 default:
10824 return ((void *)0);
10825 }
10826}
10827__attribute__ ((__pure__)) static rb_cref_t *check_cref(VALUE, int);
10828static rb_cref_t *
10829check_cref(VALUE obj, int can_be_svar)
10830{
10831 if (obj == ((VALUE)RUBY_Qfalse)) return ((void *)0);
10832 switch (imemo_type(obj)) {
10833 case imemo_ment:
10834 return method_entry_cref((rb_callable_method_entry_t *)obj);
10835 case imemo_cref:
10836 return (rb_cref_t *)obj;
10837 case imemo_svar:
10838 if (can_be_svar) {
10839 return check_cref(((struct vm_svar *)obj)->cref_or_me, 0);
10840 }
10841 default:
10842 return ((void *)0);
10843 }
10844}
10845static inline rb_cref_t *
10846vm_env_cref(const VALUE *ep)
10847{
10848 rb_cref_t *cref;
10849 while (!VM_ENV_LOCAL_P(ep)) {
10850 if ((cref = check_cref(ep[(-2)], 0)) != ((void *)0)) return cref;
10851 ep = VM_ENV_PREV_EP(ep);
10852 }
10853 return check_cref(ep[(-2)], 1);
10854}
10855static int
10856is_cref(const VALUE v, int can_be_svar)
10857{
10858 if (( ((RUBY_T_IMEMO) == RUBY_T_FIXNUM) ? (((int)(long)(v))&RUBY_FIXNUM_FLAG) : ((RUBY_T_IMEMO) == RUBY_T_TRUE) ? ((v) == ((VALUE)RUBY_Qtrue)) : ((RUBY_T_IMEMO) == RUBY_T_FALSE) ? ((v) == ((VALUE)RUBY_Qfalse)) : ((RUBY_T_IMEMO) == RUBY_T_NIL) ? ((v) == ((VALUE)RUBY_Qnil)) : ((RUBY_T_IMEMO) == RUBY_T_UNDEF) ? ((v) == ((VALUE)RUBY_Qundef)) : ((RUBY_T_IMEMO) == RUBY_T_SYMBOL) ? ((((VALUE)(v)&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG)||(!(((VALUE)(v) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(v) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(v))->flags & RUBY_T_MASK) == (RUBY_T_SYMBOL))) : ((RUBY_T_IMEMO) == RUBY_T_FLOAT) ? ( ((((int)(long)(v))&RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG) || (!(((VALUE)(v) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(v) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(v))->flags & RUBY_T_MASK) == RUBY_T_FLOAT)) : (!(((VALUE)(v) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(v) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(v))->flags & RUBY_T_MASK) == (RUBY_T_IMEMO)))) {
10859 switch (imemo_type(v)) {
10860 case imemo_cref:
10861 return 1;
10862 case imemo_svar:
10863 if (can_be_svar) return is_cref(((struct vm_svar *)v)->cref_or_me, 0);
10864 default:
10865 break;
10866 }
10867 }
10868 return 0;
10869}
10870static int
10871vm_env_cref_by_cref(const VALUE *ep)
10872{
10873 while (!VM_ENV_LOCAL_P(ep)) {
10874 if (is_cref(ep[(-2)], 0)) return 1;
10875 ep = VM_ENV_PREV_EP(ep);
10876 }
10877 return is_cref(ep[(-2)], 1);
10878}
10879static rb_cref_t *
10880cref_replace_with_duplicated_cref_each_frame(const VALUE *vptr, int can_be_svar, VALUE parent)
10881{
10882 const VALUE v = *vptr;
10883 rb_cref_t *cref, *new_cref;
10884 if (( ((RUBY_T_IMEMO) == RUBY_T_FIXNUM) ? (((int)(long)(v))&RUBY_FIXNUM_FLAG) : ((RUBY_T_IMEMO) == RUBY_T_TRUE) ? ((v) == ((VALUE)RUBY_Qtrue)) : ((RUBY_T_IMEMO) == RUBY_T_FALSE) ? ((v) == ((VALUE)RUBY_Qfalse)) : ((RUBY_T_IMEMO) == RUBY_T_NIL) ? ((v) == ((VALUE)RUBY_Qnil)) : ((RUBY_T_IMEMO) == RUBY_T_UNDEF) ? ((v) == ((VALUE)RUBY_Qundef)) : ((RUBY_T_IMEMO) == RUBY_T_SYMBOL) ? ((((VALUE)(v)&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG)||(!(((VALUE)(v) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(v) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(v))->flags & RUBY_T_MASK) == (RUBY_T_SYMBOL))) : ((RUBY_T_IMEMO) == RUBY_T_FLOAT) ? ( ((((int)(long)(v))&RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG) || (!(((VALUE)(v) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(v) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(v))->flags & RUBY_T_MASK) == RUBY_T_FLOAT)) : (!(((VALUE)(v) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(v) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(v))->flags & RUBY_T_MASK) == (RUBY_T_IMEMO)))) {
10885 switch (imemo_type(v)) {
10886 case imemo_cref:
10887 cref = (rb_cref_t *)v;
10888 new_cref = vm_cref_dup(cref);
10889 if (parent) {
10890 __extension__({
10891 ;
10892 ; typeof(rb_obj_write((VALUE)(parent), (VALUE *)(vptr), (VALUE)(new_cref), "./vm_insnhelper.c", 716)) unaligned_member_access_result = (rb_obj_write((VALUE)(parent), (VALUE *)(vptr), (VALUE)(new_cref), "./vm_insnhelper.c", 716));
10893 ; unaligned_member_access_result; });
10894 }
10895 else {
10896 VM_FORCE_WRITE(vptr, (VALUE)new_cref);
10897 }
10898 return (rb_cref_t *)new_cref;
10899 case imemo_svar:
10900 if (can_be_svar) {
10901 return cref_replace_with_duplicated_cref_each_frame((const VALUE *)&((struct vm_svar *)v)->cref_or_me, 0, v);
10902 }
10903 case imemo_ment:
10904 rb_bug("cref_replace_with_duplicated_cref_each_frame: unreachable");
10905 default:
10906 break;
10907 }
10908 }
10909 return 0;
10910}
10911static rb_cref_t *
10912vm_cref_replace_with_duplicated_cref(const VALUE *ep)
10913{
10914 if (vm_env_cref_by_cref(ep)) {
10915 rb_cref_t *cref;
10916 VALUE envval;
10917 while (!VM_ENV_LOCAL_P(ep)) {
10918 envval = VM_ENV_ESCAPED_P(ep) ? VM_ENV_ENVVAL(ep) : ((VALUE)RUBY_Qfalse);
10919 if ((cref = cref_replace_with_duplicated_cref_each_frame(&ep[(-2)], 0, envval)) != ((void *)0)) {
10920 return cref;
10921 }
10922 ep = VM_ENV_PREV_EP(ep);
10923 }
10924 envval = VM_ENV_ESCAPED_P(ep) ? VM_ENV_ENVVAL(ep) : ((VALUE)RUBY_Qfalse);
10925 return cref_replace_with_duplicated_cref_each_frame(&ep[(-2)], 1, envval);
10926 }
10927 else {
10928 rb_bug("vm_cref_dup: unreachable");
10929 }
10930}
10931static rb_cref_t *
10932vm_get_cref(const VALUE *ep)
10933{
10934 rb_cref_t *cref = vm_env_cref(ep);
10935 if (cref != ((void *)0)) {
10936 return cref;
10937 }
10938 else {
10939 rb_bug("vm_get_cref: unreachable");
10940 }
10941}
10942static rb_cref_t *
10943vm_ec_cref(const rb_execution_context_t *ec)
10944{
10945 const rb_control_frame_t *cfp = rb_vm_get_ruby_level_next_cfp(ec, ec->cfp);
10946 if (cfp == ((void *)0)) {
10947 return ((void *)0);
10948 }
10949 return vm_get_cref(cfp->ep);
10950}
10951static const rb_cref_t *
10952vm_get_const_key_cref(const VALUE *ep)
10953{
10954 const rb_cref_t *cref = vm_get_cref(ep);
10955 const rb_cref_t *key_cref = cref;
10956 while (cref) {
10957 if (((!(((VALUE)(CREF_CLASS(cref)) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(CREF_CLASS(cref)) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(CREF_CLASS(cref)))->flags & RUBY_T_MASK) != RUBY_T_NODE)?(((struct RBasic*)((CREF_CLASS(cref))))->flags&((((VALUE)RUBY_FL_SINGLETON)))):0) ||
10958 ((!(((VALUE)(CREF_CLASS(cref)) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(CREF_CLASS(cref)) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(CREF_CLASS(cref)))->flags & RUBY_T_MASK) != RUBY_T_NODE)?(((struct RBasic*)((CREF_CLASS(cref))))->flags&((((VALUE)RUBY_FL_USER6)))):0)) {
10959 return key_cref;
10960 }
10961 cref = CREF_NEXT(cref);
10962 }
10963 return ((void *)0);
10964}static inline
10965void
10966rb_vm_rewrite_cref(rb_cref_t *cref, VALUE old_klass, VALUE new_klass, rb_cref_t **new_cref_ptr)
10967{
10968 rb_cref_t *new_cref;
10969 while (cref) {
10970 if (CREF_CLASS(cref) == old_klass) {
10971 new_cref = vm_cref_new_use_prev(new_klass, METHOD_VISI_UNDEF, 0, cref, 0);
10972 *new_cref_ptr = new_cref;
10973 return;
10974 }
10975 new_cref = vm_cref_new_use_prev(CREF_CLASS(cref), METHOD_VISI_UNDEF, 0, cref, 0);
10976 cref = CREF_NEXT(cref);
10977 *new_cref_ptr = new_cref;
10978 new_cref_ptr = (rb_cref_t **)&new_cref->next;
10979 }
10980 *new_cref_ptr = ((void *)0);
10981}
10982static rb_cref_t *
10983vm_cref_push(const rb_execution_context_t *ec, VALUE klass, const VALUE *ep, int pushed_by_eval)
10984{
10985 rb_cref_t *prev_cref = ((void *)0);
10986 if (ep) {
10987 prev_cref = vm_env_cref(ep);
10988 }
10989 else {
10990 rb_control_frame_t *cfp = vm_get_ruby_level_caller_cfp(ec, ec->cfp);
10991 if (cfp) {
10992 prev_cref = vm_env_cref(cfp->ep);
10993 }
10994 }
10995 return vm_cref_new(klass, METHOD_VISI_PUBLIC, 0, prev_cref, pushed_by_eval);
10996}
10997static inline VALUE
10998vm_get_cbase(const VALUE *ep)
10999{
11000 const rb_cref_t *cref = vm_get_cref(ep);
11001 VALUE klass = ((VALUE)RUBY_Qundef);
11002 while (cref) {
11003 if ((klass = CREF_CLASS(cref)) != 0) {
11004 break;
11005 }
11006 cref = CREF_NEXT(cref);
11007 }
11008 return klass;
11009}
11010static inline VALUE
11011vm_get_const_base(const VALUE *ep)
11012{
11013 const rb_cref_t *cref = vm_get_cref(ep);
11014 VALUE klass = ((VALUE)RUBY_Qundef);
11015 while (cref) {
11016 if (!CREF_PUSHED_BY_EVAL(cref) &&
11017 (klass = CREF_CLASS(cref)) != 0) {
11018 break;
11019 }
11020 cref = CREF_NEXT(cref);
11021 }
11022 return klass;
11023}
11024static inline void
11025vm_check_if_namespace(VALUE klass)
11026{
11027 if (!( ((RUBY_T_CLASS) == RUBY_T_FIXNUM) ? (((int)(long)(klass))&RUBY_FIXNUM_FLAG) : ((RUBY_T_CLASS) == RUBY_T_TRUE) ? ((klass) == ((VALUE)RUBY_Qtrue)) : ((RUBY_T_CLASS) == RUBY_T_FALSE) ? ((klass) == ((VALUE)RUBY_Qfalse)) : ((RUBY_T_CLASS) == RUBY_T_NIL) ? ((klass) == ((VALUE)RUBY_Qnil)) : ((RUBY_T_CLASS) == RUBY_T_UNDEF) ? ((klass) == ((VALUE)RUBY_Qundef)) : ((RUBY_T_CLASS) == RUBY_T_SYMBOL) ? ((((VALUE)(klass)&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG)||(!(((VALUE)(klass) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(klass) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(klass))->flags & RUBY_T_MASK) == (RUBY_T_SYMBOL))) : ((RUBY_T_CLASS) == RUBY_T_FLOAT) ? ( ((((int)(long)(klass))&RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG) || (!(((VALUE)(klass) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(klass) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(klass))->flags & RUBY_T_MASK) == RUBY_T_FLOAT)) : (!(((VALUE)(klass) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(klass) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(klass))->flags & RUBY_T_MASK) == (RUBY_T_CLASS))) && !( ((RUBY_T_MODULE) == RUBY_T_FIXNUM) ? (((int)(long)(klass))&RUBY_FIXNUM_FLAG) : ((RUBY_T_MODULE) == RUBY_T_TRUE) ? ((klass) == ((VALUE)RUBY_Qtrue)) : ((RUBY_T_MODULE) == RUBY_T_FALSE) ? ((klass) == ((VALUE)RUBY_Qfalse)) : ((RUBY_T_MODULE) == RUBY_T_NIL) ? ((klass) == ((VALUE)RUBY_Qnil)) : ((RUBY_T_MODULE) == RUBY_T_UNDEF) ? ((klass) == ((VALUE)RUBY_Qundef)) : ((RUBY_T_MODULE) == RUBY_T_SYMBOL) ? ((((VALUE)(klass)&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG)||(!(((VALUE)(klass) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(klass) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(klass))->flags & RUBY_T_MASK) == (RUBY_T_SYMBOL))) : ((RUBY_T_MODULE) == RUBY_T_FLOAT) ? ( ((((int)(long)(klass))&RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG) || (!(((VALUE)(klass) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(klass) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(klass))->flags & RUBY_T_MASK) == RUBY_T_FLOAT)) : (!(((VALUE)(klass) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(klass) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(klass))->flags & RUBY_T_MASK) == (RUBY_T_MODULE)))) {
11028 rb_raise(rb_eTypeError, "%+""l""i" "\v"" is not a class/module", klass);
11029 }
11030}
11031static inline void
11032vm_ensure_not_refinement_module(VALUE self)
11033{
11034 if (( ((RUBY_T_MODULE) == RUBY_T_FIXNUM) ? (((int)(long)(self))&RUBY_FIXNUM_FLAG) : ((RUBY_T_MODULE) == RUBY_T_TRUE) ? ((self) == ((VALUE)RUBY_Qtrue)) : ((RUBY_T_MODULE) == RUBY_T_FALSE) ? ((self) == ((VALUE)RUBY_Qfalse)) : ((RUBY_T_MODULE) == RUBY_T_NIL) ? ((self) == ((VALUE)RUBY_Qnil)) : ((RUBY_T_MODULE) == RUBY_T_UNDEF) ? ((self) == ((VALUE)RUBY_Qundef)) : ((RUBY_T_MODULE) == RUBY_T_SYMBOL) ? ((((VALUE)(self)&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG)||(!(((VALUE)(self) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(self) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(self))->flags & RUBY_T_MASK) == (RUBY_T_SYMBOL))) : ((RUBY_T_MODULE) == RUBY_T_FLOAT) ? ( ((((int)(long)(self))&RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG) || (!(((VALUE)(self) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(self) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(self))->flags & RUBY_T_MASK) == RUBY_T_FLOAT)) : (!(((VALUE)(self) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(self) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(self))->flags & RUBY_T_MASK) == (RUBY_T_MODULE))) && ((!(((VALUE)(self) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(self) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(self))->flags & RUBY_T_MASK) != RUBY_T_NODE)?(((struct RBasic*)((self)))->flags&((RMODULE_IS_REFINEMENT))):0)) {
11035 rb_warn("not defined at the refinement, but at the outer class/module");
11036 }
11037}
11038static inline VALUE
11039vm_get_iclass(rb_control_frame_t *cfp, VALUE klass)
11040{
11041 return klass;
11042}
11043static inline VALUE
11044vm_get_ev_const(rb_execution_context_t *ec, VALUE orig_klass, ID id, _Bool allow_nil, int is_defined)
11045{
11046 void rb_const_warn_if_deprecated(const rb_const_entry_t *ce, VALUE klass, ID id);
11047 VALUE val;
11048 if (orig_klass == ((VALUE)RUBY_Qnil) && allow_nil) {
11049 const rb_cref_t *root_cref = vm_get_cref(ec->cfp->ep);
11050 const rb_cref_t *cref;
11051 VALUE klass = ((VALUE)RUBY_Qnil);
11052 while (root_cref && CREF_PUSHED_BY_EVAL(root_cref)) {
11053 root_cref = CREF_NEXT(root_cref);
11054 }
11055 cref = root_cref;
11056 while (cref && CREF_NEXT(cref)) {
11057 if (CREF_PUSHED_BY_EVAL(cref)) {
11058 klass = ((VALUE)RUBY_Qnil);
11059 }
11060 else {
11061 klass = CREF_CLASS(cref);
11062 }
11063 cref = CREF_NEXT(cref);
11064 if (!!((VALUE)(klass) != ((VALUE)RUBY_Qnil))) {
11065 VALUE av, am = 0;
11066 rb_const_entry_t *ce;
11067 search_continue:
11068 if ((ce = rb_const_lookup(klass, id))) {
11069 rb_const_warn_if_deprecated(ce, klass, id);
11070 val = ce->value;
11071 if (val == ((VALUE)RUBY_Qundef)) {
11072 if (am == klass) break;
11073 am = klass;
11074 if (is_defined) return 1;
11075 if (rb_autoloading_value(klass, id, &av, ((void *)0))) return av;
11076 rb_autoload_load(klass, id);
11077 goto search_continue;
11078 }
11079 else {
11080 if (is_defined) {
11081 return 1;
11082 }
11083 else {
11084 return val;
11085 }
11086 }
11087 }
11088 }
11089 }
11090 if (root_cref && !!((VALUE)(CREF_CLASS(root_cref)) != ((VALUE)RUBY_Qnil))) {
11091 klass = vm_get_iclass(ec->cfp, CREF_CLASS(root_cref));
11092 }
11093 else {
11094 klass = rb_class_of((VALUE)(ec->cfp->self));
11095 }
11096 if (is_defined) {
11097 return rb_const_defined(klass, id);
11098 }
11099 else {
11100 return rb_const_get(klass, id);
11101 }
11102 }
11103 else {
11104 vm_check_if_namespace(orig_klass);
11105 if (is_defined) {
11106 return rb_public_const_defined_from(orig_klass, id);
11107 }
11108 else {
11109 return rb_public_const_get_from(orig_klass, id);
11110 }
11111 }
11112}
11113static inline VALUE
11114vm_get_cvar_base(const rb_cref_t *cref, rb_control_frame_t *cfp)
11115{
11116 VALUE klass;
11117 if (!cref) {
11118 rb_bug("vm_get_cvar_base: no cref");
11119 }
11120 while (CREF_NEXT(cref) &&
11121 (!((VALUE)(CREF_CLASS(cref)) != ((VALUE)RUBY_Qnil)) || ((!(((VALUE)(CREF_CLASS(cref)) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(CREF_CLASS(cref)) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(CREF_CLASS(cref)))->flags & RUBY_T_MASK) != RUBY_T_NODE)?(((struct RBasic*)((CREF_CLASS(cref))))->flags&((((VALUE)RUBY_FL_SINGLETON)))):0) ||
11122 CREF_PUSHED_BY_EVAL(cref))) {
11123 cref = CREF_NEXT(cref);
11124 }
11125 if (!CREF_NEXT(cref)) {
11126 rb_warn("class variable access from toplevel");
11127 }
11128 klass = vm_get_iclass(cfp, CREF_CLASS(cref));
11129 if (!((VALUE)(klass) != ((VALUE)RUBY_Qnil))) {
11130 rb_raise(rb_eTypeError, "no class variables available");
11131 }
11132 return klass;
11133}
11134static VALUE
11135vm_search_const_defined_class(const VALUE cbase, ID id)
11136{
11137 if (rb_const_defined_at(cbase, id)) return cbase;
11138 if (cbase == rb_cObject) {
11139 VALUE tmp = RCLASS_SUPER(cbase);
11140 while (tmp) {
11141 if (rb_const_defined_at(tmp, id)) return tmp;
11142 tmp = RCLASS_SUPER(tmp);
11143 }
11144 }
11145 return 0;
11146}
11147__attribute__ ((__always_inline__)) static VALUE vm_getivar(VALUE, ID, IVC, struct rb_call_cache *, int);
11148static inline VALUE
11149vm_getivar(VALUE obj, ID id, IVC ic, struct rb_call_cache *cc, int is_attr)
11150{
11151 VALUE val = ((VALUE)RUBY_Qundef);
11152 if ((((VALUE)(obj) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(obj) & (VALUE)~((VALUE)RUBY_Qnil)) == 0))) {
11153 }
11154 else if ((__builtin_expect(!!(is_attr ? (cc->aux.index > 0) : (ic->ic_serial == (((struct RClass*)(((struct RBasic*)(obj))->klass))->class_serial))), 1))) {
11155 st_index_t index = !is_attr ? ic->index : (cc->aux.index - 1);
11156 ((void)0);
11157 if ((__builtin_expect(!!((int)(((struct RBasic*)(obj))->flags & RUBY_T_MASK) == RUBY_T_OBJECT), 1)) &&
11158 (__builtin_expect(!!(index < ((((struct RBasic*)(obj))->flags & ROBJECT_EMBED) ? ROBJECT_EMBED_LEN_MAX : ((struct RObject*)(obj))->as.heap.numiv)), 1))) {
11159 val = ((((struct RBasic*)(obj))->flags & ROBJECT_EMBED) ? ((struct RObject*)(obj))->as.ary : ((struct RObject*)(obj))->as.heap.ivptr)[index];
11160 }
11161 else if ((((struct RBasic*)(obj))->flags&(((VALUE)RUBY_FL_EXIVAR)))) {
11162 struct gen_ivtbl *ivtbl;
11163 if ((__builtin_expect(!!(rb_st_lookup(rb_ivar_generic_ivtbl(), (st_data_t)obj, (st_data_t *)&ivtbl)), 1)) &&
11164 (__builtin_expect(!!(index < ivtbl->numiv), 1))) {
11165 val = ivtbl->ivptr[index];
11166 }
11167 }
11168 goto ret;
11169 }
11170 else {
11171 struct st_table *iv_index_tbl;
11172 st_index_t numiv;
11173 VALUE *ivptr;
11174 st_data_t index;
11175 if ((int)(((struct RBasic*)(obj))->flags & RUBY_T_MASK) == RUBY_T_OBJECT) {
11176 iv_index_tbl = ((((struct RBasic*)(obj))->flags & ROBJECT_EMBED) ? ((((struct RClass*)(rb_obj_class(obj)))->ptr)->iv_index_tbl) : ((struct RObject*)(obj))->as.heap.iv_index_tbl);
11177 numiv = ((((struct RBasic*)(obj))->flags & ROBJECT_EMBED) ? ROBJECT_EMBED_LEN_MAX : ((struct RObject*)(obj))->as.heap.numiv);
11178 ivptr = ((((struct RBasic*)(obj))->flags & ROBJECT_EMBED) ? ((struct RObject*)(obj))->as.ary : ((struct RObject*)(obj))->as.heap.ivptr);
11179 fill:
11180 if (iv_index_tbl) {
11181 if (rb_st_lookup(iv_index_tbl, id, &index)) {
11182 if (!is_attr) {
11183 ic->index = index;
11184 ic->ic_serial = (((struct RClass*)(((struct RBasic*)(obj))->klass))->class_serial);
11185 }
11186 else {
11187 cc->aux.index = (int)index + 1;
11188 }
11189 if (index < numiv) {
11190 val = ivptr[index];
11191 }
11192 }
11193 }
11194 }
11195 else if ((((struct RBasic*)(obj))->flags&(((VALUE)RUBY_FL_EXIVAR)))) {
11196 struct gen_ivtbl *ivtbl;
11197 if ((__builtin_expect(!!(rb_st_lookup(rb_ivar_generic_ivtbl(), (st_data_t)obj, (st_data_t *)&ivtbl)), 1))) {
11198 numiv = ivtbl->numiv;
11199 ivptr = ivtbl->ivptr;
11200 iv_index_tbl = ((((struct RClass*)(rb_obj_class(obj)))->ptr)->iv_index_tbl);
11201 goto fill;
11202 }
11203 }
11204 else {
11205 goto general_path;
11206 }
11207 ret:
11208 if ((__builtin_expect(!!(val != ((VALUE)RUBY_Qundef)), 1))) {
11209 return val;
11210 }
11211 else {
11212 if (!is_attr && !(((VALUE)((*rb_ruby_verbose_ptr())) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) {
11213 rb_warning("instance variable %""l""i" "\v"" not initialized", rb_id_quote_unprintable(id));
11214 }
11215 return ((VALUE)RUBY_Qnil);
11216 }
11217 }
11218 general_path:
11219 ((void)0);
11220 if (is_attr) {
11221 return rb_attr_get(obj, id);
11222 }
11223 else {
11224 return rb_ivar_get(obj, id);
11225 }
11226}
11227ALWAYS_INLINE(static inline VALUE
11228vm_setivar(VALUE obj, ID id, VALUE val, IVC ic, struct rb_call_cache *cc, int is_attr));
11229static inline VALUE
11230vm_setivar(VALUE obj, ID id, VALUE val, IVC ic, struct rb_call_cache *cc, int is_attr) {
11231 do { VALUE frozen_obj = (obj); if ((__builtin_expect(!!((!(!(((VALUE)(frozen_obj) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(frozen_obj) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(frozen_obj))->flags & RUBY_T_MASK) != RUBY_T_NODE) || (((struct RBasic*)(frozen_obj))->flags&RUBY_FL_FREEZE))), 0))) { rb_error_frozen_object(frozen_obj); } } while (0);
11232 if ((__builtin_expect(!!(( ((RUBY_T_OBJECT) == RUBY_T_FIXNUM) ? (((int)(long)(obj))&RUBY_FIXNUM_FLAG) : ((RUBY_T_OBJECT) == RUBY_T_TRUE) ? ((obj) == ((VALUE)RUBY_Qtrue)) : ((RUBY_T_OBJECT) == RUBY_T_FALSE) ? ((obj) == ((VALUE)RUBY_Qfalse)) : ((RUBY_T_OBJECT) == RUBY_T_NIL) ? ((obj) == ((VALUE)RUBY_Qnil)) : ((RUBY_T_OBJECT) == RUBY_T_UNDEF) ? ((obj) == ((VALUE)RUBY_Qundef)) : ((RUBY_T_OBJECT) == RUBY_T_SYMBOL) ? ((((VALUE)(obj)&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG)||(!(((VALUE)(obj) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(obj) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(obj))->flags & RUBY_T_MASK) == (RUBY_T_SYMBOL))) : ((RUBY_T_OBJECT) == RUBY_T_FLOAT) ? ( ((((int)(long)(obj))&RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG) || (!(((VALUE)(obj) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(obj) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(obj))->flags & RUBY_T_MASK) == RUBY_T_FLOAT)) : (!(((VALUE)(obj) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(obj) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(obj))->flags & RUBY_T_MASK) == (RUBY_T_OBJECT)))), 1))) {
11233 VALUE klass = ((struct RBasic*)(obj))->klass;
11234 st_data_t index;
11235 if ((__builtin_expect(!!((!is_attr && (ic->ic_serial == (((struct RClass*)(klass))->class_serial))) || ( is_attr && (cc->aux.index > 0))), 1))) {
11236 VALUE *ptr = ((((struct RBasic*)(obj))->flags & ROBJECT_EMBED) ? ((struct RObject*)(obj))->as.ary : ((struct RObject*)(obj))->as.heap.ivptr);
11237 index = !is_attr ? ic->index : cc->aux.index-1;
11238 if ((index < ((((struct RBasic*)(obj))->flags & ROBJECT_EMBED) ? ROBJECT_EMBED_LEN_MAX : ((struct RObject*)(obj))->as.heap.numiv))) {
11239 __extension__({
11240 ;
11241 ; typeof(rb_obj_write((VALUE)(obj), (VALUE *)(&ptr[index]), (VALUE)(val), "./vm_insnhelper.c", 1127)) unaligned_member_access_result = (rb_obj_write((VALUE)(obj), (VALUE *)(&ptr[index]), (VALUE)(val), "./vm_insnhelper.c", 1127));
11242 ; unaligned_member_access_result; });
11243 ((void)0);
11244 return val;
11245 }
11246 }
11247 else {
11248 struct st_table *iv_index_tbl = ((((struct RBasic*)(obj))->flags & ROBJECT_EMBED) ? ((((struct RClass*)(rb_obj_class(obj)))->ptr)->iv_index_tbl) : ((struct RObject*)(obj))->as.heap.iv_index_tbl);
11249 if (iv_index_tbl && rb_st_lookup(iv_index_tbl, (st_data_t)id, &index)) {
11250 if (!is_attr) {
11251 ic->index = index;
11252 ic->ic_serial = (((struct RClass*)(klass))->class_serial);
11253 }
11254 else if (index >= 0x7fffffff) {
11255 rb_raise(rb_eArgError, "too many instance variables");
11256 }
11257 else {
11258 cc->aux.index = (int)(index + 1);
11259 }
11260 }
11261 }
11262 }
11263 else {
11264 ((void)0);
11265 }
11266 ((void)0);
11267 return rb_ivar_set(obj, id, val);
11268}
11269ALWAYS_INLINE(static inline VALUE
11270vm_getinstancevariable(VALUE obj, ID id, IVC ic));
11271static inline VALUE
11272vm_getinstancevariable(VALUE obj, ID id, IVC ic) {
11273 return vm_getivar(obj, id, ic, ((void *)0), 0);
11274}
11275ALWAYS_INLINE(static inline void
11276vm_setinstancevariable(VALUE obj, ID id, VALUE val, IVC ic));
11277static inline void
11278vm_setinstancevariable(VALUE obj, ID id, VALUE val, IVC ic) {
11279 vm_setivar(obj, id, val, ic, 0, 0);
11280}
11281static VALUE
11282vm_throw_continue(const rb_execution_context_t *ec, VALUE err)
11283{
11284 if ((((int)(long)(err))&RUBY_FIXNUM_FLAG)) {
11285 ec->tag->state = ((int)rb_fix2int((VALUE)(err)));
11286 }
11287 else if (((((VALUE)(err)&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG)||(!(((VALUE)(err) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(err) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(err))->flags & RUBY_T_MASK) == (RUBY_T_SYMBOL)))) {
11288 ec->tag->state = RUBY_TAG_THROW;
11289 }
11290 else if (( ((RUBY_T_IMEMO) == RUBY_T_FIXNUM) ? (((int)(long)((VALUE)(err)))&RUBY_FIXNUM_FLAG) : ((RUBY_T_IMEMO) == RUBY_T_TRUE) ? (((VALUE)(err)) == ((VALUE)RUBY_Qtrue)) : ((RUBY_T_IMEMO) == RUBY_T_FALSE) ? (((VALUE)(err)) == ((VALUE)RUBY_Qfalse)) : ((RUBY_T_IMEMO) == RUBY_T_NIL) ? (((VALUE)(err)) == ((VALUE)RUBY_Qnil)) : ((RUBY_T_IMEMO) == RUBY_T_UNDEF) ? (((VALUE)(err)) == ((VALUE)RUBY_Qundef)) : ((RUBY_T_IMEMO) == RUBY_T_SYMBOL) ? ((((VALUE)((VALUE)(err))&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG)||(!(((VALUE)((VALUE)(err)) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)((VALUE)(err)) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)((VALUE)(err)))->flags & RUBY_T_MASK) == (RUBY_T_SYMBOL))) : ((RUBY_T_IMEMO) == RUBY_T_FLOAT) ? ( ((((int)(long)((VALUE)(err)))&RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG) || (!(((VALUE)((VALUE)(err)) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)((VALUE)(err)) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)((VALUE)(err)))->flags & RUBY_T_MASK) == RUBY_T_FLOAT)) : (!(((VALUE)((VALUE)(err)) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)((VALUE)(err)) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)((VALUE)(err)))->flags & RUBY_T_MASK) == (RUBY_T_IMEMO)))) {
11291 ec->tag->state = THROW_DATA_STATE((struct vm_throw_data *)err);
11292 }
11293 else {
11294 ec->tag->state = RUBY_TAG_RAISE;
11295 }
11296 return err;
11297}
11298static VALUE
11299vm_throw_start(const rb_execution_context_t *ec, rb_control_frame_t *const reg_cfp, enum ruby_tag_type state,
11300 const int flag, const VALUE throwobj)
11301{
11302 const rb_control_frame_t *escape_cfp = ((void *)0);
11303 const rb_control_frame_t * const eocfp = RUBY_VM_END_CONTROL_FRAME(ec);
11304 if (flag != 0) {
11305 }
11306 else if (state == RUBY_TAG_BREAK) {
11307 int is_orphan = 1;
11308 const VALUE *ep = ((((reg_cfp)->ep)));
11309 const rb_iseq_t *base_iseq = ((((reg_cfp)))->iseq);
11310 escape_cfp = reg_cfp;
11311 while (base_iseq->body->type != ISEQ_TYPE_BLOCK) {
11312 if (escape_cfp->iseq->body->type == ISEQ_TYPE_CLASS) {
11313 escape_cfp = ((escape_cfp)+1);
11314 ep = escape_cfp->ep;
11315 base_iseq = escape_cfp->iseq;
11316 }
11317 else {
11318 ep = VM_ENV_PREV_EP(ep);
11319 base_iseq = base_iseq->body->parent_iseq;
11320 escape_cfp = rb_vm_search_cf_from_ep(ec, escape_cfp, ep);
11321 ((void)0);
11322 }
11323 }
11324 if (VM_FRAME_LAMBDA_P(escape_cfp)) {
11325 is_orphan = 0;
11326 state = RUBY_TAG_RETURN;
11327 }
11328 else {
11329 ep = VM_ENV_PREV_EP(ep);
11330 while (escape_cfp < eocfp) {
11331 if (escape_cfp->ep == ep) {
11332 const rb_iseq_t *const iseq = escape_cfp->iseq;
11333 const VALUE epc = escape_cfp->pc - iseq->body->iseq_encoded;
11334 const struct iseq_catch_table *const ct = iseq->body->catch_table;
11335 unsigned int i;
11336 if (!ct) break;
11337 for (i=0; i < ct->size; i++) {
11338 const struct iseq_catch_table_entry *const entry =
11339 __extension__({
11340 ;
11341 ; typeof(&(ct)->entries[i]) unaligned_member_access_result = (&(ct)->entries[i]);
11342 ; unaligned_member_access_result; });
11343 if (entry->type == CATCH_TYPE_BREAK &&
11344 entry->iseq == base_iseq &&
11345 entry->start < epc && entry->end >= epc) {
11346 if (entry->cont == epc) {
11347 is_orphan = 0;
11348 }
11349 break;
11350 }
11351 }
11352 break;
11353 }
11354 escape_cfp = ((escape_cfp)+1);
11355 }
11356 }
11357 if (is_orphan) {
11358 rb_vm_localjump_error("break from proc-closure", throwobj, RUBY_TAG_BREAK);
11359 }
11360 }
11361 else if (state == RUBY_TAG_RETRY) {
11362 const VALUE *ep = VM_ENV_PREV_EP(((((reg_cfp)->ep))));
11363 escape_cfp = rb_vm_search_cf_from_ep(ec, reg_cfp, ep);
11364 }
11365 else if (state == RUBY_TAG_RETURN) {
11366 const VALUE *current_ep = ((((reg_cfp)->ep)));
11367 const VALUE *target_lep = VM_EP_LEP(current_ep);
11368 int in_class_frame = 0;
11369 int toplevel = 1;
11370 escape_cfp = reg_cfp;
11371 while (escape_cfp < eocfp) {
11372 const VALUE *lep = VM_CF_LEP(escape_cfp);
11373 if (!target_lep) {
11374 target_lep = lep;
11375 }
11376 if (lep == target_lep &&
11377 VM_FRAME_RUBYFRAME_P(escape_cfp) &&
11378 escape_cfp->iseq->body->type == ISEQ_TYPE_CLASS) {
11379 in_class_frame = 1;
11380 target_lep = 0;
11381 }
11382 if (lep == target_lep) {
11383 if (VM_FRAME_LAMBDA_P(escape_cfp)) {
11384 toplevel = 0;
11385 if (in_class_frame) {
11386 goto valid_return;
11387 }
11388 else {
11389 const VALUE *tep = current_ep;
11390 while (target_lep != tep) {
11391 if (escape_cfp->ep == tep) {
11392 goto valid_return;
11393 }
11394 tep = VM_ENV_PREV_EP(tep);
11395 }
11396 }
11397 }
11398 else if (VM_FRAME_RUBYFRAME_P(escape_cfp)) {
11399 switch (escape_cfp->iseq->body->type) {
11400 case ISEQ_TYPE_TOP:
11401 case ISEQ_TYPE_MAIN:
11402 if (toplevel) {
11403 if (in_class_frame) goto unexpected_return;
11404 goto valid_return;
11405 }
11406 break;
11407 case ISEQ_TYPE_EVAL:
11408 case ISEQ_TYPE_CLASS:
11409 toplevel = 0;
11410 break;
11411 default:
11412 break;
11413 }
11414 }
11415 }
11416 if (escape_cfp->ep == target_lep && escape_cfp->iseq->body->type == ISEQ_TYPE_METHOD) {
11417 goto valid_return;
11418 }
11419 escape_cfp = ((escape_cfp)+1);
11420 }
11421 unexpected_return:;
11422 rb_vm_localjump_error("unexpected return", throwobj, RUBY_TAG_RETURN);
11423 valid_return:;
11424 }
11425 else {
11426 rb_bug("isns(throw): unsupported throw type");
11427 }
11428 ec->tag->state = state;
11429 return (VALUE)THROW_DATA_NEW(throwobj, escape_cfp, state);
11430}
11431static VALUE
11432vm_throw(const rb_execution_context_t *ec, rb_control_frame_t *reg_cfp,
11433 rb_num_t throw_state, VALUE throwobj)
11434{
11435 const int state = (int)(throw_state & VM_THROW_STATE_MASK);
11436 const int flag = (int)(throw_state & VM_THROW_NO_ESCAPE_FLAG);
11437 if (state != 0) {
11438 return vm_throw_start(ec, reg_cfp, state, flag, throwobj);
11439 }
11440 else {
11441 return vm_throw_continue(ec, throwobj);
11442 }
11443}
11444static inline void
11445vm_expandarray(VALUE *sp, VALUE ary, rb_num_t num, int flag)
11446{
11447 int is_splat = flag & 0x01;
11448 rb_num_t space_size = num + is_splat;
11449 VALUE *base = sp - 1;
11450 const VALUE *ptr;
11451 rb_num_t len;
11452 const VALUE obj = ary;
11453 if (!( ((RUBY_T_ARRAY) == RUBY_T_FIXNUM) ? (((int)(long)(ary))&RUBY_FIXNUM_FLAG) : ((RUBY_T_ARRAY) == RUBY_T_TRUE) ? ((ary) == ((VALUE)RUBY_Qtrue)) : ((RUBY_T_ARRAY) == RUBY_T_FALSE) ? ((ary) == ((VALUE)RUBY_Qfalse)) : ((RUBY_T_ARRAY) == RUBY_T_NIL) ? ((ary) == ((VALUE)RUBY_Qnil)) : ((RUBY_T_ARRAY) == RUBY_T_UNDEF) ? ((ary) == ((VALUE)RUBY_Qundef)) : ((RUBY_T_ARRAY) == RUBY_T_SYMBOL) ? ((((VALUE)(ary)&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG)||(!(((VALUE)(ary) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(ary) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(ary))->flags & RUBY_T_MASK) == (RUBY_T_SYMBOL))) : ((RUBY_T_ARRAY) == RUBY_T_FLOAT) ? ( ((((int)(long)(ary))&RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG) || (!(((VALUE)(ary) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(ary) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(ary))->flags & RUBY_T_MASK) == RUBY_T_FLOAT)) : (!(((VALUE)(ary) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(ary) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(ary))->flags & RUBY_T_MASK) == (RUBY_T_ARRAY))) && !((VALUE)(ary = rb_check_array_type(ary)) != ((VALUE)RUBY_Qnil))) {
11454 ary = obj;
11455 ptr = &ary;
11456 len = 1;
11457 }
11458 else {
11459 ptr = rb_array_const_ptr_transient(ary);
11460 len = (rb_num_t)rb_array_len(ary);
11461 }
11462 if (space_size == 0) {
11463 }
11464 else if (flag & 0x02) {
11465 rb_num_t i = 0, j;
11466 if (len < num) {
11467 for (i=0; i<num-len; i++) {
11468 *base++ = ((VALUE)RUBY_Qnil);
11469 }
11470 }
11471 for (j=0; i<num; i++, j++) {
11472 VALUE v = ptr[len - j - 1];
11473 *base++ = v;
11474 }
11475 if (is_splat) {
11476 *base = rb_ary_new_from_values(len - j, ptr);
11477 }
11478 }
11479 else {
11480 rb_num_t i;
11481 VALUE *bptr = &base[space_size - 1];
11482 for (i=0; i<num; i++) {
11483 if (len <= i) {
11484 for (; i<num; i++) {
11485 *bptr-- = ((VALUE)RUBY_Qnil);
11486 }
11487 break;
11488 }
11489 *bptr-- = ptr[i];
11490 }
11491 if (is_splat) {
11492 if (num > len) {
11493 *bptr = rb_ary_new();
11494 }
11495 else {
11496 *bptr = rb_ary_new_from_values(len - num, ptr + num);
11497 }
11498 }
11499 }
11500 (*__extension__ ({ volatile VALUE *rb_gc_guarded_ptr = &(ary); __asm__("" : : "m"(rb_gc_guarded_ptr)); rb_gc_guarded_ptr; }));
11501}
11502static VALUE vm_call_general(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, struct rb_calling_info *calling, struct rb_call_data *cd);
11503__attribute__((__artificial__))
11504static inline vm_call_handler
11505calccall(const struct rb_call_data *cd, const rb_callable_method_entry_t *me)
11506{
11507 const struct rb_call_info *ci = &cd->ci;
11508 const struct rb_call_cache *cc = &cd->cc;
11509 if ((__builtin_expect(!!(!me), 0))) {
11510 ((void)0);
11511 return vm_call_general;
11512 }
11513 else if ((__builtin_expect(!!(cc->me != me), 1))) {
11514 ((void)0);
11515 return vm_call_general;
11516 }
11517 else if ((__builtin_expect(!!(cc->method_serial != me->def->method_serial), 0))) {
11518 ((void)0);
11519 return vm_call_general;
11520 }
11521 else if (((rb_method_visibility_t)(((cc->me)->flags & (((VALUE)RUBY_FL_USER4) | ((VALUE)RUBY_FL_USER5))) >> ((((VALUE)RUBY_FL_USHIFT) + 4)+0)) != METHOD_VISI_PUBLIC) &&
11522 !(ci->flag & (0x01 << VM_CALL_FCALL_bit))) {
11523 ((void)0);
11524 return vm_call_general;
11525 }
11526 else {
11527 ((void)0);
11528 (void)(cc->call != vm_call_general);
11529 return cc->call;
11530 }
11531}
11532__attribute__ ((__visibility__("default"))) extern void
11533rb_vm_search_method_slowpath(struct rb_call_data *cd, VALUE klass)
11534;
11535static inline _Bool
11536vm_cache_check_for_class_serial(struct rb_call_cache *cc, rb_serial_t class_serial)
11537{
11538 int i;
11539 rb_serial_t j;
11540 for (i = 0; i < ((int)(sizeof(cc->class_serial) / sizeof((cc->class_serial)[0]))); i++) {
11541 j = cc->class_serial[i];
11542 if (! j) {
11543 break;
11544 }
11545 else if (j != class_serial) {
11546 continue;
11547 }
11548 else if (! i) {
11549 return 1;
11550 }
11551 else {
11552 goto hit;
11553 }
11554 }
11555 ((void)0);
11556 return 0;
11557 hit:
11558 for (; i > 0; i--) {
11559 cc->class_serial[i] = cc->class_serial[i - 1];
11560 }
11561 cc->class_serial[0] = j;
11562 memset((&cc->aux), 0, sizeof(cc->aux)*(size_t)(1));
11563 return 1;
11564}
11565static void
11566vm_search_method_fastpath(struct rb_call_data *cd, VALUE klass)
11567{
11568 struct rb_call_cache *cc = &cd->cc;
11569 if ((__builtin_expect(!!(((ruby_vm_global_method_state) == cc->method_state) && vm_cache_check_for_class_serial(cc, (((struct RClass*)(klass))->class_serial))), 1))) {
11570 ((void)0);
11571 ((void)0);
11572 return;
11573 }
11574 ((void)0);
11575 rb_vm_search_method_slowpath(cd, klass);
11576}
11577static void
11578vm_search_method(struct rb_call_data *cd, VALUE recv)
11579{
11580 VALUE klass = rb_class_of((VALUE)(recv));
11581 ((void)0);
11582 ((void)0);
11583 vm_search_method_fastpath(cd, klass);
11584}
11585static inline int
11586check_cfunc(const rb_callable_method_entry_t *me, VALUE (*func)())
11587{
11588 if (me && me->def->type == VM_METHOD_TYPE_CFUNC &&
11589 me->def->body.cfunc.func == func) {
11590 return 1;
11591 }
11592 else {
11593 return 0;
11594 }
11595}
11596static inline int
11597vm_method_cfunc_is(CALL_DATA cd, VALUE recv, VALUE (*func)())
11598{
11599 vm_search_method(cd, recv);
11600 return check_cfunc(cd->cc.me, func);
11601}
11602static VALUE
11603opt_equal_fallback(VALUE recv, VALUE obj, CALL_DATA cd)
11604{
11605 if (vm_method_cfunc_is(cd, recv, rb_obj_equal)) {
11606 return recv == obj ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse);
11607 }
11608 return ((VALUE)RUBY_Qundef);
11609}
11610static inline _Bool
11611FIXNUM_2_P(VALUE a, VALUE b)
11612{
11613 long x = a;
11614 long y = b;
11615 long z = x & y & 1;
11616 return z == 1;
11617}
11618static inline _Bool
11619FLONUM_2_P(VALUE a, VALUE b)
11620{
11621 long x = a;
11622 long y = b;
11623 long z = ((x ^ 2) | (y ^ 2)) & 3;
11624 return !z;
11625}
11626static inline int
11627comparable_by_identity(VALUE recv, VALUE obj)
11628{
11629 if (FIXNUM_2_P(recv, obj)) {
11630 return (((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_EQ)]&((1 << 0))) == 0), 1))) != 0) * 2 - 1;
11631 }
11632 if (FLONUM_2_P(recv, obj)) {
11633 return (((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_EQ)]&((1 << 1))) == 0), 1))) != 0) * 2 - 1;
11634 }
11635 if (((((VALUE)(recv)&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG)||(!(((VALUE)(recv) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(recv) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(recv))->flags & RUBY_T_MASK) == (RUBY_T_SYMBOL))) && ((((VALUE)(obj)&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG)||(!(((VALUE)(obj) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(obj) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(obj))->flags & RUBY_T_MASK) == (RUBY_T_SYMBOL)))) {
11636 return (((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_EQ)]&((1 << 6))) == 0), 1))) != 0) * 2 - 1;
11637 }
11638 return 0;
11639}
11640static
11641inline
11642VALUE
11643opt_eq_func(VALUE recv, VALUE obj, CALL_DATA cd)
11644{
11645 switch (comparable_by_identity(recv, obj)) {
11646 case 1:
11647 return (recv == obj) ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse);
11648 case -1:
11649 goto fallback;
11650 }
11651 if (0) {
11652 }
11653 else if ((!(((VALUE)(recv) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(recv) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (((struct RBasic*)(recv))->klass) == rb_cFloat)) {
11654 if (((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_EQ)]&((1 << 1))) == 0), 1)))) {
11655 return rb_float_equal(recv, obj);
11656 }
11657 }
11658 else if ((!(((VALUE)(recv) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(recv) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (((struct RBasic*)(recv))->klass) == rb_cString) && ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_EQ)]&((1 << 2))) == 0), 1)))) {
11659 if (recv == obj) return ((VALUE)RUBY_Qtrue);
11660 if (( ((RUBY_T_STRING) == RUBY_T_FIXNUM) ? (((int)(long)(obj))&RUBY_FIXNUM_FLAG) : ((RUBY_T_STRING) == RUBY_T_TRUE) ? ((obj) == ((VALUE)RUBY_Qtrue)) : ((RUBY_T_STRING) == RUBY_T_FALSE) ? ((obj) == ((VALUE)RUBY_Qfalse)) : ((RUBY_T_STRING) == RUBY_T_NIL) ? ((obj) == ((VALUE)RUBY_Qnil)) : ((RUBY_T_STRING) == RUBY_T_UNDEF) ? ((obj) == ((VALUE)RUBY_Qundef)) : ((RUBY_T_STRING) == RUBY_T_SYMBOL) ? ((((VALUE)(obj)&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG)||(!(((VALUE)(obj) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(obj) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(obj))->flags & RUBY_T_MASK) == (RUBY_T_SYMBOL))) : ((RUBY_T_STRING) == RUBY_T_FLOAT) ? ( ((((int)(long)(obj))&RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG) || (!(((VALUE)(obj) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(obj) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(obj))->flags & RUBY_T_MASK) == RUBY_T_FLOAT)) : (!(((VALUE)(obj) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(obj) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(obj))->flags & RUBY_T_MASK) == (RUBY_T_STRING)))) {
11661 return rb_str_eql_internal(recv, obj);
11662 }
11663 }
11664 fallback:
11665 return opt_equal_fallback(recv, obj, cd);
11666}
11667static
11668inline
11669VALUE
11670opt_eql_func(VALUE recv, VALUE obj, CALL_DATA cd)
11671{
11672 switch (comparable_by_identity(recv, obj)) {
11673 case 1:
11674 return (recv == obj) ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse);
11675 case -1:
11676 goto fallback;
11677 }
11678 if (0) {
11679 }
11680 else if ((!(((VALUE)(recv) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(recv) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (((struct RBasic*)(recv))->klass) == rb_cFloat)) {
11681 if (((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_EQ)]&((1 << 1))) == 0), 1)))) {
11682 return rb_float_eql(recv, obj);
11683 }
11684 }
11685 else if ((!(((VALUE)(recv) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(recv) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (((struct RBasic*)(recv))->klass) == rb_cString)) {
11686 if (((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_EQ)]&((1 << 2))) == 0), 1)))) {
11687 return rb_str_eql(recv, obj);
11688 }
11689 }
11690 fallback:
11691 return opt_equal_fallback(recv, obj, cd);
11692}
11693VALUE
11694rb_equal_opt(VALUE obj1, VALUE obj2)
11695;static inline
11696VALUE
11697rb_eql_opt(VALUE obj1, VALUE obj2)
11698{
11699 struct rb_call_data cd = { .ci = { .mid = idEqlP, }, };
11700 return opt_eql_func(obj1, obj2, &cd);
11701}
11702extern VALUE rb_vm_call0(rb_execution_context_t *ec, VALUE, ID, int, const VALUE*, const rb_callable_method_entry_t *, int kw_splat);
11703static VALUE
11704check_match(rb_execution_context_t *ec, VALUE pattern, VALUE target, enum vm_check_match_type type)
11705{
11706 switch (type) {
11707 case VM_CHECKMATCH_TYPE_WHEN:
11708 return pattern;
11709 case VM_CHECKMATCH_TYPE_RESCUE:
11710 if (!rb_obj_is_kind_of(pattern, rb_cModule)) {
11711 rb_raise(rb_eTypeError, "class or module required for rescue clause");
11712 }
11713 case VM_CHECKMATCH_TYPE_CASE: {
11714 const rb_callable_method_entry_t *me =
11715 rb_callable_method_entry_with_refinements(rb_class_of((VALUE)(pattern)), idEqq, ((void *)0));
11716 if (me) {
11717 return rb_vm_call0(ec, pattern, idEqq, 1, &target, me, 0);
11718 }
11719 else {
11720 return __extension__({ static struct rb_call_data rb_funcallv_data; rb_funcallv_with_cc(&rb_funcallv_data, pattern, idEqq, 1, &target); });
11721 }
11722 }
11723 default:
11724 rb_bug("check_match: unreachable");
11725 }
11726}
11727static inline VALUE
11728double_cmp_lt(double a, double b)
11729{
11730 ;
11731 return a < b ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse);
11732}
11733static inline VALUE
11734double_cmp_le(double a, double b)
11735{
11736 ;
11737 return a <= b ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse);
11738}
11739static inline VALUE
11740double_cmp_gt(double a, double b)
11741{
11742 ;
11743 return a > b ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse);
11744}
11745static inline VALUE
11746double_cmp_ge(double a, double b)
11747{
11748 ;
11749 return a >= b ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse);
11750}
11751static inline VALUE *
11752vm_base_ptr(const rb_control_frame_t *cfp)
11753{
11754 return cfp->__bp__;
11755}
11756__attribute__ ((__noreturn__)) static void raise_argument_error(rb_execution_context_t *ec, const rb_iseq_t *iseq, const VALUE exc);
11757__attribute__ ((__noreturn__)) static void argument_arity_error(rb_execution_context_t *ec, const rb_iseq_t *iseq, const int miss_argc, const int min_argc, const int max_argc);
11758__attribute__ ((__noreturn__)) static void argument_kw_error(rb_execution_context_t *ec, const rb_iseq_t *iseq, const char *error, const VALUE keys);
11759VALUE rb_keyword_error_new(const char *error, VALUE keys);
11760static VALUE method_missing(VALUE obj, ID id, int argc, const VALUE *argv,
11761 enum method_missing_reason call_status, int kw_splat);
11762__attribute__ ((__visibility__("default"))) extern
11763const rb_callable_method_entry_t *rb_resolve_refined_method_callable(VALUE refinements, const rb_callable_method_entry_t *me);
11764struct args_info {
11765 VALUE *argv;
11766 int argc;
11767 int rest_index;
11768 int rest_dupped;
11769 const struct rb_call_info_kw_arg *kw_arg;
11770 VALUE *kw_argv;
11771 VALUE rest;
11772};
11773enum arg_setup_type {
11774 arg_setup_method,
11775 arg_setup_block
11776};
11777static inline void
11778arg_rest_dup(struct args_info *args)
11779{
11780 if (!args->rest_dupped) {
11781 args->rest = rb_ary_dup(args->rest);
11782 args->rest_dupped = 1;
11783 }
11784}
11785static inline int
11786args_argc(struct args_info *args)
11787{
11788 if (args->rest == ((VALUE)RUBY_Qfalse)) {
11789 return args->argc;
11790 }
11791 else {
11792 return args->argc + rb_long2int_inline(rb_array_len(args->rest)) - args->rest_index;
11793 }
11794}
11795static inline void
11796args_extend(struct args_info *args, const int min_argc)
11797{
11798 int i;
11799 if (args->rest) {
11800 arg_rest_dup(args);
11801 ((void)0);
11802 for (i=args->argc + rb_long2int_inline(rb_array_len(args->rest)); i<min_argc; i++) {
11803 rb_ary_push(args->rest, ((VALUE)RUBY_Qnil));
11804 }
11805 }
11806 else {
11807 for (i=args->argc; i<min_argc; i++) {
11808 args->argv[args->argc++] = ((VALUE)RUBY_Qnil);
11809 }
11810 }
11811}
11812static inline void
11813args_reduce(struct args_info *args, int over_argc)
11814{
11815 if (args->rest) {
11816 const long len = rb_array_len(args->rest);
11817 if (len > over_argc) {
11818 arg_rest_dup(args);
11819 rb_ary_resize(args->rest, len - over_argc);
11820 return;
11821 }
11822 else {
11823 args->rest = ((VALUE)RUBY_Qfalse);
11824 over_argc -= len;
11825 }
11826 }
11827 ((void)0);
11828 args->argc -= over_argc;
11829}
11830static inline int
11831args_check_block_arg0(struct args_info *args)
11832{
11833 VALUE ary = ((VALUE)RUBY_Qnil);
11834 if (args->rest && rb_array_len(args->rest) == 1) {
11835 VALUE arg0 = (rb_array_const_ptr_transient(args->rest)[0]);
11836 ary = rb_check_array_type(arg0);
11837 }
11838 else if (args->argc == 1) {
11839 VALUE arg0 = args->argv[0];
11840 ary = rb_check_array_type(arg0);
11841 args->argv[0] = arg0;
11842 }
11843 if (!!((VALUE)(ary) != ((VALUE)RUBY_Qnil))) {
11844 args->rest = ary;
11845 args->rest_index = 0;
11846 args->argc = 0;
11847 return 1;
11848 }
11849 return 0;
11850}
11851static inline void
11852args_copy(struct args_info *args)
11853{
11854 if (args->rest != ((VALUE)RUBY_Qfalse)) {
11855 int argc = args->argc;
11856 args->argc = 0;
11857 arg_rest_dup(args);
11858 while (args->rest_index > 0 && argc > 0) {
11859 do { const VALUE _ary = (args->rest); const VALUE _v = (args->argv[--argc]); VALUE *ptr = (VALUE *)rb_array_ptr_use_start(_ary, 1); __extension__({
11860 ;
11861 ; typeof(rb_obj_write((VALUE)(_ary), (VALUE *)(&ptr[--args->rest_index]), (VALUE)(_v), "./vm_args.c", 154)) unaligned_member_access_result = (rb_obj_write((VALUE)(_ary), (VALUE *)(&ptr[--args->rest_index]), (VALUE)(_v), "./vm_args.c", 154));
11862 ; unaligned_member_access_result; }); rb_array_ptr_use_end(_ary, 1); } while (0);
11863 }
11864 while (argc > 0) {
11865 rb_ary_unshift(args->rest, args->argv[--argc]);
11866 }
11867 }
11868 else if (args->argc > 0) {
11869 args->rest = rb_ary_new_from_values(args->argc, args->argv);
11870 args->rest_index = 0;
11871 args->rest_dupped = 1;
11872 args->argc = 0;
11873 }
11874}
11875static inline const VALUE *
11876args_rest_argv(struct args_info *args)
11877{
11878 return rb_array_const_ptr_transient(args->rest) + args->rest_index;
11879}
11880static inline VALUE
11881args_rest_array(struct args_info *args)
11882{
11883 VALUE ary;
11884 if (args->rest) {
11885 ary = rb_ary_behead(args->rest, args->rest_index);
11886 args->rest_index = 0;
11887 args->rest = 0;
11888 }
11889 else {
11890 ary = rb_ary_new();
11891 }
11892 return ary;
11893}
11894static int
11895keyword_hash_symbol_other_iter(st_data_t key, st_data_t val, st_data_t arg)
11896{
11897 *(int*)arg |= ((((VALUE)((VALUE)key)&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG)||(!(((VALUE)((VALUE)key) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)((VALUE)key) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)((VALUE)key))->flags & RUBY_T_MASK) == (RUBY_T_SYMBOL))) ? 1 : 2;
11898 if ((*(int*)arg & 3) == 3) {
11899 return ST_STOP;
11900 }
11901 return ST_CONTINUE;
11902}
11903static int
11904keyword_hash_symbol_other(VALUE hash)
11905{
11906 int symbol_other = 0;
11907 rb_hash_stlike_foreach(hash, keyword_hash_symbol_other_iter, (st_data_t)(&symbol_other));
11908 return symbol_other;
11909}
11910static int
11911keyword_hash_split_iter(st_data_t key, st_data_t val, st_data_t arg)
11912{
11913 if (((((VALUE)((VALUE)key)&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG)||(!(((VALUE)((VALUE)key) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)((VALUE)key) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)((VALUE)key))->flags & RUBY_T_MASK) == (RUBY_T_SYMBOL)))) {
11914 rb_hash_aset((VALUE)arg, (VALUE)key, (VALUE)val);
11915 return ST_DELETE;
11916 }
11917 return ST_CONTINUE;
11918}
11919static void
11920keyword_hash_split(VALUE *kw_hash_ptr, VALUE *rest_hash_ptr)
11921{
11922 *kw_hash_ptr = rb_hash_new();
11923 rb_hash_stlike_foreach(*rest_hash_ptr, keyword_hash_split_iter, (st_data_t)(*kw_hash_ptr));
11924}
11925static int
11926keyword_hash_p(VALUE *kw_hash_ptr, VALUE *rest_hash_ptr, int check_only_symbol)
11927{
11928 *rest_hash_ptr = rb_check_hash_type(*kw_hash_ptr);
11929 if (!!((VALUE)(*rest_hash_ptr) != ((VALUE)RUBY_Qnil))) {
11930 if (check_only_symbol) {
11931 switch (keyword_hash_symbol_other(*rest_hash_ptr)) {
11932 case 0:
11933 case 1:
11934 break;
11935 case 2:
11936 *kw_hash_ptr = ((VALUE)RUBY_Qnil);
11937 return 0;
11938 case 3:
11939 *rest_hash_ptr = rb_hash_dup(*rest_hash_ptr);
11940 keyword_hash_split(kw_hash_ptr, rest_hash_ptr);
11941 return 1;
11942 }
11943 }
11944 *kw_hash_ptr = *rest_hash_ptr;
11945 *rest_hash_ptr = ((VALUE)RUBY_Qfalse);
11946 return 1;
11947 }
11948 else {
11949 *kw_hash_ptr = ((VALUE)RUBY_Qnil);
11950 return 0;
11951 }
11952}
11953static VALUE
11954args_pop_keyword_hash(struct args_info *args, VALUE *kw_hash_ptr, int check_only_symbol)
11955{
11956 VALUE rest_hash;
11957 if (args->rest == ((VALUE)RUBY_Qfalse)) {
11958 from_argv:
11959 ((void)0);
11960 *kw_hash_ptr = args->argv[args->argc-1];
11961 if (keyword_hash_p(kw_hash_ptr, &rest_hash, check_only_symbol)) {
11962 if (rest_hash) {
11963 args->argv[args->argc-1] = rest_hash;
11964 }
11965 else {
11966 args->argc--;
11967 return 1;
11968 }
11969 }
11970 }
11971 else {
11972 long len = rb_array_len(args->rest);
11973 if (len > 0) {
11974 *kw_hash_ptr = (rb_array_const_ptr_transient(args->rest)[len - 1]);
11975 if (keyword_hash_p(kw_hash_ptr, &rest_hash, check_only_symbol)) {
11976 if (rest_hash) {
11977 do { const VALUE _ary = (args->rest); const VALUE _v = (rest_hash); VALUE *ptr = (VALUE *)rb_array_ptr_use_start(_ary, 1); __extension__({
11978 ;
11979 ; typeof(rb_obj_write((VALUE)(_ary), (VALUE *)(&ptr[len - 1]), (VALUE)(_v), "./vm_args.c", 291)) unaligned_member_access_result = (rb_obj_write((VALUE)(_ary), (VALUE *)(&ptr[len - 1]), (VALUE)(_v), "./vm_args.c", 291));
11980 ; unaligned_member_access_result; }); rb_array_ptr_use_end(_ary, 1); } while (0);
11981 }
11982 else {
11983 arg_rest_dup(args);
11984 rb_ary_pop(args->rest);
11985 return 1;
11986 }
11987 }
11988 }
11989 else {
11990 goto from_argv;
11991 }
11992 }
11993 return 0;
11994}
11995static int
11996args_kw_argv_to_hash(struct args_info *args)
11997{
11998 const struct rb_call_info_kw_arg *kw_arg = args->kw_arg;
11999 const VALUE *const passed_keywords = kw_arg->keywords;
12000 const int kw_len = kw_arg->keyword_len;
12001 VALUE h = rb_hash_new_with_size(kw_len);
12002 const int kw_start = args->argc - kw_len;
12003 const VALUE * const kw_argv = args->argv + kw_start;
12004 int i;
12005 args->argc = kw_start + 1;
12006 for (i=0; i<kw_len; i++) {
12007 rb_hash_aset(h, passed_keywords[i], kw_argv[i]);
12008 }
12009 args->argv[args->argc - 1] = h;
12010 return args->argc;
12011}
12012static void
12013args_stored_kw_argv_to_hash(struct args_info *args)
12014{
12015 int i;
12016 const struct rb_call_info_kw_arg *kw_arg = args->kw_arg;
12017 const VALUE *const passed_keywords = kw_arg->keywords;
12018 const int passed_keyword_len = kw_arg->keyword_len;
12019 VALUE h = rb_hash_new_with_size(passed_keyword_len);
12020 for (i=0; i<passed_keyword_len; i++) {
12021 rb_hash_aset(h, passed_keywords[i], args->kw_argv[i]);
12022 }
12023 args->kw_argv = ((void *)0);
12024 if (args->rest) {
12025 arg_rest_dup(args);
12026 rb_ary_push(args->rest, h);
12027 }
12028 else {
12029 args->argv[args->argc++] = h;
12030 }
12031}
12032static inline void
12033args_setup_lead_parameters(struct args_info *args, int argc, VALUE *locals)
12034{
12035 if (args->argc >= argc) {
12036 args->argc -= argc;
12037 args->argv += argc;
12038 }
12039 else {
12040 int i, j;
12041 const VALUE *argv = args_rest_argv(args);
12042 for (i=args->argc, j=0; i<argc; i++, j++) {
12043 locals[i] = argv[j];
12044 }
12045 args->rest_index += argc - args->argc;
12046 args->argc = 0;
12047 }
12048}
12049static inline void
12050args_setup_post_parameters(struct args_info *args, int argc, VALUE *locals)
12051{
12052 long len;
12053 len = rb_array_len(args->rest);
12054 ruby_nonempty_memcpy((locals), (rb_array_const_ptr_transient(args->rest) + len - argc), sizeof(VALUE)*(size_t)(argc));
12055 rb_ary_resize(args->rest, len - argc);
12056}
12057static inline int
12058args_setup_opt_parameters(struct args_info *args, int opt_max, VALUE *locals)
12059{
12060 int i;
12061 if (args->argc >= opt_max) {
12062 args->argc -= opt_max;
12063 args->argv += opt_max;
12064 i = opt_max;
12065 }
12066 else {
12067 int j;
12068 i = args->argc;
12069 args->argc = 0;
12070 if (args->rest) {
12071 int len = rb_long2int_inline(rb_array_len(args->rest));
12072 const VALUE *argv = rb_array_const_ptr_transient(args->rest);
12073 for (; i<opt_max && args->rest_index < len; i++, args->rest_index++) {
12074 locals[i] = argv[args->rest_index];
12075 }
12076 }
12077 for (j=i; j<opt_max; j++) {
12078 locals[j] = ((VALUE)RUBY_Qnil);
12079 }
12080 }
12081 return i;
12082}
12083static inline void
12084args_setup_rest_parameter(struct args_info *args, VALUE *locals)
12085{
12086 *locals = args_rest_array(args);
12087}
12088static VALUE
12089make_unknown_kw_hash(const VALUE *passed_keywords, int passed_keyword_len, const VALUE *kw_argv)
12090{
12091 int i;
12092 VALUE obj = rb_ary_tmp_new(1);
12093 for (i=0; i<passed_keyword_len; i++) {
12094 if (kw_argv[i] != ((VALUE)RUBY_Qundef)) {
12095 rb_ary_push(obj, passed_keywords[i]);
12096 }
12097 }
12098 return obj;
12099}
12100static VALUE
12101make_rest_kw_hash(const VALUE *passed_keywords, int passed_keyword_len, const VALUE *kw_argv)
12102{
12103 int i;
12104 VALUE obj = rb_hash_new_with_size(passed_keyword_len);
12105 for (i=0; i<passed_keyword_len; i++) {
12106 if (kw_argv[i] != ((VALUE)RUBY_Qundef)) {
12107 rb_hash_aset(obj, passed_keywords[i], kw_argv[i]);
12108 }
12109 }
12110 return obj;
12111}
12112static inline int
12113args_setup_kw_parameters_lookup(const ID key, VALUE *ptr, const VALUE *const passed_keywords, VALUE *passed_values, const int passed_keyword_len)
12114{
12115 int i;
12116 const VALUE keyname = (rb_id2sym(key));
12117 for (i=0; i<passed_keyword_len; i++) {
12118 if (keyname == passed_keywords[i]) {
12119 *ptr = passed_values[i];
12120 passed_values[i] = ((VALUE)RUBY_Qundef);
12121 return 1;
12122 }
12123 }
12124 return 0;
12125}
12126static void
12127args_setup_kw_parameters(rb_execution_context_t *const ec, const rb_iseq_t *const iseq,
12128 VALUE *const passed_values, const int passed_keyword_len, const VALUE *const passed_keywords,
12129 VALUE *const locals)
12130{
12131 const ID *acceptable_keywords = iseq->body->param.keyword->table;
12132 const int req_key_num = iseq->body->param.keyword->required_num;
12133 const int key_num = iseq->body->param.keyword->num;
12134 const VALUE * const default_values = iseq->body->param.keyword->default_values;
12135 VALUE missing = 0;
12136 int i, di, found = 0;
12137 int unspecified_bits = 0;
12138 VALUE unspecified_bits_value = ((VALUE)RUBY_Qnil);
12139 for (i=0; i<req_key_num; i++) {
12140 ID key = acceptable_keywords[i];
12141 if (args_setup_kw_parameters_lookup(key, &locals[i], passed_keywords, passed_values, passed_keyword_len)) {
12142 found++;
12143 }
12144 else {
12145 if (!missing) missing = rb_ary_tmp_new(1);
12146 rb_ary_push(missing, (rb_id2sym(key)));
12147 }
12148 }
12149 if (missing) argument_kw_error(ec, iseq, "missing", missing);
12150 for (di=0; i<key_num; i++, di++) {
12151 if (args_setup_kw_parameters_lookup(acceptable_keywords[i], &locals[i], passed_keywords, passed_values, passed_keyword_len)) {
12152 found++;
12153 }
12154 else {
12155 if (default_values[di] == ((VALUE)RUBY_Qundef)) {
12156 locals[i] = ((VALUE)RUBY_Qnil);
12157 if ((__builtin_expect(!!(i < (32-1)), 1))) {
12158 unspecified_bits |= 0x01 << di;
12159 }
12160 else {
12161 if (!((VALUE)(unspecified_bits_value) != ((VALUE)RUBY_Qnil))) {
12162 int j;
12163 unspecified_bits_value = rb_hash_new();
12164 for (j=0; j<(32-1); j++) {
12165 if (unspecified_bits & (0x01 << j)) {
12166 rb_hash_aset(unspecified_bits_value, (((VALUE)(j))<<1 | RUBY_FIXNUM_FLAG), ((VALUE)RUBY_Qtrue));
12167 }
12168 }
12169 }
12170 rb_hash_aset(unspecified_bits_value, (((VALUE)(di))<<1 | RUBY_FIXNUM_FLAG), ((VALUE)RUBY_Qtrue));
12171 }
12172 }
12173 else {
12174 locals[i] = default_values[di];
12175 }
12176 }
12177 }
12178 if (iseq->body->param.flags.has_kwrest) {
12179 const int rest_hash_index = key_num + 1;
12180 locals[rest_hash_index] = make_rest_kw_hash(passed_keywords, passed_keyword_len, passed_values);
12181 }
12182 else {
12183 if (found != passed_keyword_len) {
12184 VALUE keys = make_unknown_kw_hash(passed_keywords, passed_keyword_len, passed_values);
12185 argument_kw_error(ec, iseq, "unknown", keys);
12186 }
12187 }
12188 if (!((VALUE)(unspecified_bits_value) != ((VALUE)RUBY_Qnil))) {
12189 unspecified_bits_value = (((VALUE)(unspecified_bits))<<1 | RUBY_FIXNUM_FLAG);
12190 }
12191 locals[key_num] = unspecified_bits_value;
12192}
12193static inline void
12194args_setup_kw_rest_parameter(VALUE keyword_hash, VALUE *locals)
12195{
12196 locals[0] = !((VALUE)(keyword_hash) != ((VALUE)RUBY_Qnil)) ? rb_hash_new() : rb_hash_dup(keyword_hash);
12197}
12198static inline void
12199args_setup_block_parameter(const rb_execution_context_t *ec, struct rb_calling_info *calling, VALUE *locals)
12200{
12201 VALUE block_handler = calling->block_handler;
12202 *locals = rb_vm_bh_to_procval(ec, block_handler);
12203}
12204struct fill_values_arg {
12205 VALUE *keys;
12206 VALUE *vals;
12207 int argc;
12208};
12209static int
12210fill_keys_values(st_data_t key, st_data_t val, st_data_t ptr)
12211{
12212 struct fill_values_arg *arg = (struct fill_values_arg *)ptr;
12213 int i = arg->argc++;
12214 arg->keys[i] = (VALUE)key;
12215 arg->vals[i] = (VALUE)val;
12216 return ST_CONTINUE;
12217}
12218static inline int
12219ignore_keyword_hash_p(VALUE keyword_hash, const rb_iseq_t * const iseq)
12220{
12221 if (!(iseq->body->param.flags.has_kw) &&
12222 !(iseq->body->param.flags.has_kwrest)) {
12223 keyword_hash = rb_check_hash_type(keyword_hash);
12224 if (!!((VALUE)(keyword_hash) != ((VALUE)RUBY_Qnil)) && (((!(((struct RBasic*)((keyword_hash)))->flags&(RHASH_ST_TABLE_FLAG))) ? ((unsigned int)((((struct RBasic*)(keyword_hash))->flags & (VALUE)RHASH_AR_TABLE_SIZE_MASK) >> RHASH_AR_TABLE_SIZE_SHIFT)) : ((((struct RHash*)(keyword_hash))->as.st)->num_entries)) == 0)) {
12225 return 1;
12226 }
12227 }
12228 return 0;
12229}
12230VALUE rb_iseq_location(const rb_iseq_t *iseq);
12231static st_table *caller_to_callees = 0;
12232static VALUE
12233rb_warn_check(const rb_execution_context_t * const ec, const rb_iseq_t *const iseq)
12234{
12235 if (!rb_warning_category_enabled_p(RB_WARN_CATEGORY_DEPRECATED)) return 1;
12236 if (!iseq) return 0;
12237 const st_data_t callee = (st_data_t)(iseq->body->iseq_unique_id * 2);
12238 const rb_control_frame_t * const cfp = rb_vm_get_ruby_level_next_cfp(ec, ec->cfp);
12239 if (!cfp) return 0;
12240 const st_data_t caller = (st_data_t)cfp->pc;
12241 if (!caller_to_callees) {
12242 caller_to_callees = rb_st_init_numtable();
12243 }
12244 st_data_t val;
12245 if (rb_st_lookup(caller_to_callees, caller, &val)) {
12246 st_table *callees;
12247 if (val & 1) {
12248 val &= ~(st_data_t)1;
12249 if (val == callee) return 1;
12250 callees = rb_st_init_numtable();
12251 rb_st_insert(callees, val, 1);
12252 }
12253 else {
12254 callees = (st_table *) val;
12255 if (rb_st_lookup((callees),(callee),(st_data_t *)0)) return 1;
12256 }
12257 rb_st_insert(callees, callee, 1);
12258 rb_st_insert(caller_to_callees, caller, (st_data_t) callees);
12259 }
12260 else {
12261 rb_st_insert(caller_to_callees, caller, callee | 1);
12262 }
12263 return 0;
12264}
12265static inline void
12266rb_warn_keyword_to_last_hash(rb_execution_context_t * const ec, struct rb_calling_info *calling, const struct rb_call_info *ci, const rb_iseq_t * const iseq)
12267{
12268 if (rb_warn_check(ec, iseq)) return;
12269 VALUE name, loc;
12270 if (calling->recv == ((VALUE)RUBY_Qundef)) {
12271 rb_warn("Passing the keyword argument as the last hash parameter is deprecated");
12272 return;
12273 }
12274 name = rb_id2str(ci->mid);
12275 loc = rb_iseq_location(iseq);
12276 if (!((VALUE)(loc) != ((VALUE)RUBY_Qnil))) {
12277 rb_warn("Passing the keyword argument for `%""l""i" "\v""' as the last hash parameter is deprecated",
12278 name);
12279 }
12280 else {
12281 rb_warn("Passing the keyword argument as the last hash parameter is deprecated");
12282 if (name) {
12283 rb_compile_warn((!(((struct RBasic*)((rb_array_const_ptr_transient(loc)[0])))->flags & RSTRING_NOEMBED) ? ((struct RString*)((rb_array_const_ptr_transient(loc)[0])))->as.ary : ((struct RString*)((rb_array_const_ptr_transient(loc)[0])))->as.heap.ptr), ((int)rb_fix2int((VALUE)((rb_array_const_ptr_transient(loc)[1])))),
12284 "The called method `%""l""i" "\v""' is defined here", name);
12285 }
12286 else {
12287 rb_compile_warn((!(((struct RBasic*)((rb_array_const_ptr_transient(loc)[0])))->flags & RSTRING_NOEMBED) ? ((struct RString*)((rb_array_const_ptr_transient(loc)[0])))->as.ary : ((struct RString*)((rb_array_const_ptr_transient(loc)[0])))->as.heap.ptr), ((int)rb_fix2int((VALUE)((rb_array_const_ptr_transient(loc)[1])))),
12288 "The called method is defined here");
12289 }
12290 }
12291}
12292static inline void
12293rb_warn_split_last_hash_to_keyword(rb_execution_context_t * const ec, struct rb_calling_info *calling, const struct rb_call_info *ci, const rb_iseq_t * const iseq)
12294{
12295 if (rb_warn_check(ec, iseq)) return;
12296 VALUE name, loc;
12297 name = rb_id2str(ci->mid);
12298 loc = rb_iseq_location(iseq);
12299 if (!((VALUE)(loc) != ((VALUE)RUBY_Qnil))) {
12300 rb_warn("Splitting the last argument for `%""l""i" "\v""' into positional and keyword parameters is deprecated",
12301 name);
12302 }
12303 else {
12304 rb_warn("Splitting the last argument into positional and keyword parameters is deprecated");
12305 if (calling->recv != ((VALUE)RUBY_Qundef)) {
12306 rb_compile_warn((!(((struct RBasic*)((rb_array_const_ptr_transient(loc)[0])))->flags & RSTRING_NOEMBED) ? ((struct RString*)((rb_array_const_ptr_transient(loc)[0])))->as.ary : ((struct RString*)((rb_array_const_ptr_transient(loc)[0])))->as.heap.ptr), ((int)rb_fix2int((VALUE)((rb_array_const_ptr_transient(loc)[1])))),
12307 "The called method `%""l""i" "\v""' is defined here", name);
12308 }
12309 else {
12310 rb_compile_warn((!(((struct RBasic*)((rb_array_const_ptr_transient(loc)[0])))->flags & RSTRING_NOEMBED) ? ((struct RString*)((rb_array_const_ptr_transient(loc)[0])))->as.ary : ((struct RString*)((rb_array_const_ptr_transient(loc)[0])))->as.heap.ptr), ((int)rb_fix2int((VALUE)((rb_array_const_ptr_transient(loc)[1])))),
12311 "The called method is defined here");
12312 }
12313 }
12314}
12315static inline void
12316rb_warn_last_hash_to_keyword(rb_execution_context_t * const ec, struct rb_calling_info *calling, const struct rb_call_info *ci, const rb_iseq_t * const iseq)
12317{
12318 if (rb_warn_check(ec, iseq)) return;
12319 VALUE name, loc;
12320 name = rb_id2str(ci->mid);
12321 loc = rb_iseq_location(iseq);
12322 if (!((VALUE)(loc) != ((VALUE)RUBY_Qnil))) {
12323 rb_warn("Using the last argument for `%""l""i" "\v""' as keyword parameters is deprecated; maybe ** should be added to the call",
12324 name);
12325 }
12326 else {
12327 rb_warn("Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call");
12328 if (calling->recv != ((VALUE)RUBY_Qundef)) {
12329 rb_compile_warn((!(((struct RBasic*)((rb_array_const_ptr_transient(loc)[0])))->flags & RSTRING_NOEMBED) ? ((struct RString*)((rb_array_const_ptr_transient(loc)[0])))->as.ary : ((struct RString*)((rb_array_const_ptr_transient(loc)[0])))->as.heap.ptr), ((int)rb_fix2int((VALUE)((rb_array_const_ptr_transient(loc)[1])))),
12330 "The called method `%""l""i" "\v""' is defined here", name);
12331 }
12332 else {
12333 rb_compile_warn((!(((struct RBasic*)((rb_array_const_ptr_transient(loc)[0])))->flags & RSTRING_NOEMBED) ? ((struct RString*)((rb_array_const_ptr_transient(loc)[0])))->as.ary : ((struct RString*)((rb_array_const_ptr_transient(loc)[0])))->as.heap.ptr), ((int)rb_fix2int((VALUE)((rb_array_const_ptr_transient(loc)[1])))),
12334 "The called method is defined here");
12335 }
12336 }
12337}
12338static int
12339setup_parameters_complex(rb_execution_context_t * const ec, const rb_iseq_t * const iseq,
12340 struct rb_calling_info *const calling,
12341 const struct rb_call_info *ci,
12342 VALUE * const locals, const enum arg_setup_type arg_setup_type)
12343{
12344 const int min_argc = iseq->body->param.lead_num + iseq->body->param.post_num;
12345 const int max_argc = (iseq->body->param.flags.has_rest == 0) ? min_argc + iseq->body->param.opt_num : (-1);
12346 int opt_pc = 0;
12347 int given_argc;
12348 int kw_splat = 0;
12349 unsigned int kw_flag = ci->flag & ((0x01 << VM_CALL_KWARG_bit) | (0x01 << VM_CALL_KW_SPLAT_bit));
12350 struct args_info args_body, *args;
12351 VALUE keyword_hash = ((VALUE)RUBY_Qnil);
12352 VALUE * const orig_sp = ec->cfp->sp;
12353 unsigned int i;
12354 int remove_empty_keyword_hash = 1;
12355 VALUE flag_keyword_hash = 0;
12356 ;
12357 for (i=calling->argc; i<iseq->body->param.size; i++) {
12358 locals[i] = ((VALUE)RUBY_Qnil);
12359 }
12360 ec->cfp->sp = &locals[i];
12361 args = &args_body;
12362 given_argc = args->argc = calling->argc;
12363 args->argv = locals;
12364 args->rest_dupped = 0;
12365 if (kw_flag & (0x01 << VM_CALL_KWARG_bit)) {
12366 args->kw_arg = ((struct rb_call_info_with_kwarg *)ci)->kw_arg;
12367 if (iseq->body->param.flags.has_kw) {
12368 int kw_len = args->kw_arg->keyword_len;
12369 args->kw_argv = (VALUE*)__builtin_alloca_with_align((sizeof(VALUE)*(kw_len)), _Alignof(VALUE) * 8);
12370 args->argc -= kw_len;
12371 given_argc -= kw_len;
12372 ruby_nonempty_memcpy((args->kw_argv), (locals + args->argc), sizeof(VALUE)*(size_t)(kw_len));
12373 }
12374 else {
12375 args->kw_argv = ((void *)0);
12376 given_argc = args_kw_argv_to_hash(args);
12377 kw_flag |= (0x01 << VM_CALL_KW_SPLAT_bit);
12378 }
12379 }
12380 else {
12381 args->kw_arg = ((void *)0);
12382 args->kw_argv = ((void *)0);
12383 }
12384 if (kw_flag && iseq->body->param.flags.ruby2_keywords) {
12385 remove_empty_keyword_hash = 0;
12386 }
12387 if (ci->flag & (0x01 << VM_CALL_ARGS_SPLAT_bit)) {
12388 VALUE rest_last = 0;
12389 int len;
12390 args->rest = locals[--args->argc];
12391 args->rest_index = 0;
12392 len = rb_long2int_inline(rb_array_len(args->rest));
12393 given_argc += len - 1;
12394 rest_last = (rb_array_const_ptr_transient(args->rest)[len - 1]);
12395 if (!kw_flag && len > 0) {
12396 if (( ((RUBY_T_HASH) == RUBY_T_FIXNUM) ? (((int)(long)(rest_last))&RUBY_FIXNUM_FLAG) : ((RUBY_T_HASH) == RUBY_T_TRUE) ? ((rest_last) == ((VALUE)RUBY_Qtrue)) : ((RUBY_T_HASH) == RUBY_T_FALSE) ? ((rest_last) == ((VALUE)RUBY_Qfalse)) : ((RUBY_T_HASH) == RUBY_T_NIL) ? ((rest_last) == ((VALUE)RUBY_Qnil)) : ((RUBY_T_HASH) == RUBY_T_UNDEF) ? ((rest_last) == ((VALUE)RUBY_Qundef)) : ((RUBY_T_HASH) == RUBY_T_SYMBOL) ? ((((VALUE)(rest_last)&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG)||(!(((VALUE)(rest_last) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(rest_last) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(rest_last))->flags & RUBY_T_MASK) == (RUBY_T_SYMBOL))) : ((RUBY_T_HASH) == RUBY_T_FLOAT) ? ( ((((int)(long)(rest_last))&RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG) || (!(((VALUE)(rest_last) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(rest_last) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(rest_last))->flags & RUBY_T_MASK) == RUBY_T_FLOAT)) : (!(((VALUE)(rest_last) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(rest_last) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(rest_last))->flags & RUBY_T_MASK) == (RUBY_T_HASH))) &&
12397 (((struct RHash *)rest_last)->basic.flags & RHASH_PASS_AS_KEYWORDS)) {
12398 rest_last = rb_hash_dup(rest_last);
12399 kw_flag |= (0x01 << VM_CALL_KW_SPLAT_bit);
12400 if (iseq->body->param.flags.ruby2_keywords) {
12401 remove_empty_keyword_hash = 0;
12402 }
12403 }
12404 else {
12405 rest_last = 0;
12406 }
12407 }
12408 if (kw_flag & (0x01 << VM_CALL_KW_SPLAT_bit)) {
12409 if (len > 0 && ignore_keyword_hash_p(rest_last, iseq)) {
12410 if (given_argc != min_argc) {
12411 if (remove_empty_keyword_hash) {
12412 arg_rest_dup(args);
12413 rb_ary_pop(args->rest);
12414 given_argc--;
12415 kw_flag &= ~(0x01 << VM_CALL_KW_SPLAT_bit);
12416 }
12417 else {
12418 flag_keyword_hash = rest_last;
12419 }
12420 }
12421 else {
12422 rb_warn_keyword_to_last_hash(ec, calling, ci, iseq);
12423 }
12424 }
12425 else if (!remove_empty_keyword_hash && rest_last) {
12426 flag_keyword_hash = rest_last;
12427 }
12428 }
12429 }
12430 else {
12431 if (kw_flag & (0x01 << VM_CALL_KW_SPLAT_bit)) {
12432 VALUE last_arg = args->argv[args->argc-1];
12433 if (ignore_keyword_hash_p(last_arg, iseq)) {
12434 if (given_argc != min_argc) {
12435 if (remove_empty_keyword_hash) {
12436 args->argc--;
12437 given_argc--;
12438 kw_flag &= ~(0x01 << VM_CALL_KW_SPLAT_bit);
12439 }
12440 else {
12441 flag_keyword_hash = last_arg;
12442 }
12443 }
12444 else {
12445 rb_warn_keyword_to_last_hash(ec, calling, ci, iseq);
12446 }
12447 }
12448 else if (!remove_empty_keyword_hash) {
12449 flag_keyword_hash = args->argv[args->argc-1];
12450 }
12451 }
12452 args->rest = ((VALUE)RUBY_Qfalse);
12453 }
12454 if (flag_keyword_hash && ( ((RUBY_T_HASH) == RUBY_T_FIXNUM) ? (((int)(long)(flag_keyword_hash))&RUBY_FIXNUM_FLAG) : ((RUBY_T_HASH) == RUBY_T_TRUE) ? ((flag_keyword_hash) == ((VALUE)RUBY_Qtrue)) : ((RUBY_T_HASH) == RUBY_T_FALSE) ? ((flag_keyword_hash) == ((VALUE)RUBY_Qfalse)) : ((RUBY_T_HASH) == RUBY_T_NIL) ? ((flag_keyword_hash) == ((VALUE)RUBY_Qnil)) : ((RUBY_T_HASH) == RUBY_T_UNDEF) ? ((flag_keyword_hash) == ((VALUE)RUBY_Qundef)) : ((RUBY_T_HASH) == RUBY_T_SYMBOL) ? ((((VALUE)(flag_keyword_hash)&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG)||(!(((VALUE)(flag_keyword_hash) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(flag_keyword_hash) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(flag_keyword_hash))->flags & RUBY_T_MASK) == (RUBY_T_SYMBOL))) : ((RUBY_T_HASH) == RUBY_T_FLOAT) ? ( ((((int)(long)(flag_keyword_hash))&RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG) || (!(((VALUE)(flag_keyword_hash) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(flag_keyword_hash) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(flag_keyword_hash))->flags & RUBY_T_MASK) == RUBY_T_FLOAT)) : (!(((VALUE)(flag_keyword_hash) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(flag_keyword_hash) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(flag_keyword_hash))->flags & RUBY_T_MASK) == (RUBY_T_HASH)))) {
12455 ((struct RHash *)flag_keyword_hash)->basic.flags |= RHASH_PASS_AS_KEYWORDS;
12456 }
12457 if (kw_flag && iseq->body->param.flags.accepts_no_kwarg) {
12458 rb_raise(rb_eArgError, "no keywords accepted");
12459 }
12460 switch (arg_setup_type) {
12461 case arg_setup_method:
12462 break;
12463 case arg_setup_block:
12464 if (given_argc == 1 &&
12465 (min_argc > 0 || iseq->body->param.opt_num > 1 ||
12466 iseq->body->param.flags.has_kw || iseq->body->param.flags.has_kwrest) &&
12467 !iseq->body->param.flags.ambiguous_param0 &&
12468 args_check_block_arg0(args)) {
12469 given_argc = rb_long2int_inline(rb_array_len(args->rest));
12470 }
12471 break;
12472 }
12473 if (given_argc < min_argc) {
12474 if (given_argc == min_argc - 1 && args->kw_argv) {
12475 args_stored_kw_argv_to_hash(args);
12476 given_argc = args_argc(args);
12477 }
12478 else {
12479 if (arg_setup_type == arg_setup_block) {
12480 if ((__builtin_expect(!!(!(!(1/!!(sizeof(*((ec->cfp)->sp)) == sizeof(VALUE))) || !(1/!!(sizeof(*(ec->cfp)) == sizeof(rb_control_frame_t))) || ((rb_control_frame_t *)(((ec->cfp)->sp) + (min_argc)) + 1) >= (ec->cfp))), 1))) {(void)0;} else vm_stackoverflow();
12481 given_argc = min_argc;
12482 args_extend(args, min_argc);
12483 }
12484 else {
12485 argument_arity_error(ec, iseq, given_argc, min_argc, max_argc);
12486 }
12487 }
12488 }
12489 if (kw_flag & (0x01 << VM_CALL_KW_SPLAT_bit)) {
12490 kw_splat = !iseq->body->param.flags.has_rest;
12491 }
12492 if ((iseq->body->param.flags.has_kw || iseq->body->param.flags.has_kwrest ||
12493 (kw_splat && given_argc > max_argc)) &&
12494 args->kw_argv == ((void *)0)) {
12495 if (given_argc > min_argc) {
12496 if (kw_flag) {
12497 int check_only_symbol = (kw_flag & (0x01 << VM_CALL_KW_SPLAT_bit)) &&
12498 iseq->body->param.flags.has_kw &&
12499 !iseq->body->param.flags.has_kwrest;
12500 if (args_pop_keyword_hash(args, &keyword_hash, check_only_symbol)) {
12501 given_argc--;
12502 }
12503 else if (check_only_symbol) {
12504 if (keyword_hash != ((VALUE)RUBY_Qnil)) {
12505 rb_warn_split_last_hash_to_keyword(ec, calling, ci, iseq);
12506 }
12507 else {
12508 rb_warn_keyword_to_last_hash(ec, calling, ci, iseq);
12509 }
12510 }
12511 }
12512 else if (args_pop_keyword_hash(args, &keyword_hash, 1)) {
12513 rb_warn_last_hash_to_keyword(ec, calling, ci, iseq);
12514 given_argc--;
12515 }
12516 else if (keyword_hash != ((VALUE)RUBY_Qnil)) {
12517 rb_warn_split_last_hash_to_keyword(ec, calling, ci, iseq);
12518 }
12519 }
12520 else if (given_argc == min_argc && kw_flag) {
12521 rb_warn_keyword_to_last_hash(ec, calling, ci, iseq);
12522 }
12523 }
12524 if (given_argc > max_argc && max_argc != (-1)) {
12525 if (arg_setup_type == arg_setup_block) {
12526 args_reduce(args, given_argc - max_argc);
12527 given_argc = max_argc;
12528 }
12529 else {
12530 argument_arity_error(ec, iseq, given_argc, min_argc, max_argc);
12531 }
12532 }
12533 if (iseq->body->param.flags.has_lead) {
12534 args_setup_lead_parameters(args, iseq->body->param.lead_num, locals + 0);
12535 }
12536 if (iseq->body->param.flags.has_rest || iseq->body->param.flags.has_post){
12537 args_copy(args);
12538 }
12539 if (iseq->body->param.flags.has_post) {
12540 args_setup_post_parameters(args, iseq->body->param.post_num, locals + iseq->body->param.post_start);
12541 }
12542 if (iseq->body->param.flags.has_opt) {
12543 int opt = args_setup_opt_parameters(args, iseq->body->param.opt_num, locals + iseq->body->param.lead_num);
12544 opt_pc = (int)iseq->body->param.opt_table[opt];
12545 }
12546 if (iseq->body->param.flags.has_rest) {
12547 args_setup_rest_parameter(args, locals + iseq->body->param.rest_start);
12548 }
12549 if (iseq->body->param.flags.has_kw) {
12550 VALUE * const klocals = locals + iseq->body->param.keyword->bits_start - iseq->body->param.keyword->num;
12551 if (args->kw_argv != ((void *)0)) {
12552 const struct rb_call_info_kw_arg *kw_arg = args->kw_arg;
12553 args_setup_kw_parameters(ec, iseq, args->kw_argv, kw_arg->keyword_len, kw_arg->keywords, klocals);
12554 }
12555 else if (!!((VALUE)(keyword_hash) != ((VALUE)RUBY_Qnil))) {
12556 int kw_len = rb_long2int_inline(((!(((struct RBasic*)((keyword_hash)))->flags&(RHASH_ST_TABLE_FLAG))) ? ((unsigned int)((((struct RBasic*)(keyword_hash))->flags & (VALUE)RHASH_AR_TABLE_SIZE_MASK) >> RHASH_AR_TABLE_SIZE_SHIFT)) : ((((struct RHash*)(keyword_hash))->as.st)->num_entries)));
12557 struct fill_values_arg arg;
12558 arg.keys = args->kw_argv = (VALUE*)__builtin_alloca_with_align((sizeof(VALUE)*(kw_len * 2)), _Alignof(VALUE) * 8);
12559 arg.vals = arg.keys + kw_len;
12560 arg.argc = 0;
12561 rb_hash_foreach(keyword_hash, fill_keys_values, (VALUE)&arg);
12562 ((void)0);
12563 args_setup_kw_parameters(ec, iseq, arg.vals, kw_len, arg.keys, klocals);
12564 }
12565 else {
12566 ((void)0);
12567 args_setup_kw_parameters(ec, iseq, ((void *)0), 0, ((void *)0), klocals);
12568 }
12569 }
12570 else if (iseq->body->param.flags.has_kwrest) {
12571 args_setup_kw_rest_parameter(keyword_hash, locals + iseq->body->param.keyword->rest_start);
12572 }
12573 else if (!!((VALUE)(keyword_hash) != ((VALUE)RUBY_Qnil)) && ((!(((struct RBasic*)((keyword_hash)))->flags&(RHASH_ST_TABLE_FLAG))) ? ((unsigned int)((((struct RBasic*)(keyword_hash))->flags & (VALUE)RHASH_AR_TABLE_SIZE_MASK) >> RHASH_AR_TABLE_SIZE_SHIFT)) : ((((struct RHash*)(keyword_hash))->as.st)->num_entries)) > 0 && arg_setup_type == arg_setup_method) {
12574 argument_kw_error(ec, iseq, "unknown", rb_hash_keys(keyword_hash));
12575 }
12576 if (iseq->body->param.flags.has_block) {
12577 if (iseq->body->local_iseq == iseq) {
12578 }
12579 else {
12580 args_setup_block_parameter(ec, calling, locals + iseq->body->param.block_start);
12581 }
12582 }
12583 ec->cfp->sp = orig_sp;
12584 return opt_pc;
12585}
12586void rb_backtrace_use_iseq_first_lineno_for_last_location(VALUE self);
12587static void
12588raise_argument_error(rb_execution_context_t *ec, const rb_iseq_t *iseq, const VALUE exc)
12589{
12590 VALUE at;
12591 if (iseq) {
12592 vm_push_frame(ec, iseq, VM_FRAME_MAGIC_DUMMY | VM_ENV_FLAG_LOCAL, ((VALUE)RUBY_Qnil) ,
12593 0 , ((VALUE)RUBY_Qfalse) ,
12594 iseq->body->iseq_encoded,
12595 ec->cfp->sp, 0, 0 );
12596 at = rb_ec_backtrace_object(ec);
12597 rb_backtrace_use_iseq_first_lineno_for_last_location(at);
12598 rb_vm_pop_frame(ec);
12599 }
12600 else {
12601 at = rb_ec_backtrace_object(ec);
12602 }
12603 rb_ivar_set(exc, idBt_locations, at);
12604 rb_exc_set_backtrace(exc, at);
12605 rb_exc_raise(exc);
12606}
12607static void
12608argument_arity_error(rb_execution_context_t *ec, const rb_iseq_t *iseq, const int miss_argc, const int min_argc, const int max_argc)
12609{
12610 VALUE exc = rb_arity_error_new(miss_argc, min_argc, max_argc);
12611 if (iseq->body->param.flags.has_kw) {
12612 const struct rb_iseq_param_keyword *const kw = iseq->body->param.keyword;
12613 const ID *keywords = kw->table;
12614 int req_key_num = kw->required_num;
12615 if (req_key_num > 0) {
12616 static const char required[] = "; required keywords";
12617 VALUE mesg = rb_attr_get(exc, idMesg);
12618 rb_str_resize(mesg, (!(((struct RBasic*)(mesg))->flags & RSTRING_NOEMBED) ? (long)((((struct RBasic*)(mesg))->flags >> RSTRING_EMBED_LEN_SHIFT) & (RSTRING_EMBED_LEN_MASK >> RSTRING_EMBED_LEN_SHIFT)) : ((struct RString*)(mesg))->as.heap.len)-1);
12619 rb_str_cat(mesg, required, sizeof(required) - 1 - (req_key_num == 1));
12620 __extension__ ({ (__builtin_constant_p(":")) ? rb_str_cat((mesg), (":"), (long)strlen(":")) : rb_str_cat_cstr((mesg), (":")); });
12621 do {
12622 __extension__ ({ (__builtin_constant_p(" ")) ? rb_str_cat((mesg), (" "), (long)strlen(" ")) : rb_str_cat_cstr((mesg), (" ")); });
12623 rb_str_append(mesg, rb_id2str(*keywords++));
12624 __extension__ ({ (__builtin_constant_p(",")) ? rb_str_cat((mesg), (","), (long)strlen(",")) : rb_str_cat_cstr((mesg), (",")); });
12625 } while (--req_key_num);
12626 (!(((struct RBasic*)(mesg))->flags & RSTRING_NOEMBED) ? ((struct RString*)(mesg))->as.ary : ((struct RString*)(mesg))->as.heap.ptr)[(!(((struct RBasic*)(mesg))->flags & RSTRING_NOEMBED) ? (long)((((struct RBasic*)(mesg))->flags >> RSTRING_EMBED_LEN_SHIFT) & (RSTRING_EMBED_LEN_MASK >> RSTRING_EMBED_LEN_SHIFT)) : ((struct RString*)(mesg))->as.heap.len)-1] = ')';
12627 }
12628 }
12629 raise_argument_error(ec, iseq, exc);
12630}
12631static void
12632argument_kw_error(rb_execution_context_t *ec, const rb_iseq_t *iseq, const char *error, const VALUE keys)
12633{
12634 raise_argument_error(ec, iseq, rb_keyword_error_new(error, keys));
12635}
12636static inline void
12637vm_caller_setup_arg_splat(rb_control_frame_t *cfp, struct rb_calling_info *calling)
12638{
12639 int argc = calling->argc;
12640 VALUE *argv = cfp->sp - argc;
12641 VALUE ary = argv[argc-1];
12642 ;
12643 cfp->sp--;
12644 if (!!((VALUE)(ary) != ((VALUE)RUBY_Qnil))) {
12645 const VALUE *ptr = rb_array_const_ptr_transient(ary);
12646 long len = rb_array_len(ary), i;
12647 if ((__builtin_expect(!!(!(!(1/!!(sizeof(*((cfp)->sp)) == sizeof(VALUE))) || !(1/!!(sizeof(*(cfp)) == sizeof(rb_control_frame_t))) || ((rb_control_frame_t *)(((cfp)->sp) + (len)) + 1) >= (cfp))), 1))) {(void)0;} else vm_stackoverflow();
12648 for (i = 0; i < len; i++) {
12649 *cfp->sp++ = ptr[i];
12650 }
12651 calling->argc += i - 1;
12652 }
12653}
12654static inline void
12655vm_caller_setup_arg_kw(rb_control_frame_t *cfp, struct rb_calling_info *calling, const struct rb_call_info *ci)
12656{
12657 struct rb_call_info_with_kwarg *ci_kw = (struct rb_call_info_with_kwarg *)ci;
12658 const VALUE *const passed_keywords = ci_kw->kw_arg->keywords;
12659 const int kw_len = ci_kw->kw_arg->keyword_len;
12660 const VALUE h = rb_hash_new_with_size(kw_len);
12661 VALUE *sp = cfp->sp;
12662 int i;
12663 for (i=0; i<kw_len; i++) {
12664 rb_hash_aset(h, passed_keywords[i], (sp - kw_len)[i]);
12665 }
12666 (sp-kw_len)[0] = h;
12667 cfp->sp -= kw_len - 1;
12668 calling->argc -= kw_len - 1;
12669 calling->kw_splat = 1;
12670}
12671static VALUE
12672vm_to_proc(VALUE proc)
12673{
12674 if ((__builtin_expect(!!(!rb_obj_is_proc(proc)), 0))) {
12675 VALUE b;
12676 const rb_callable_method_entry_t *me =
12677 rb_callable_method_entry_with_refinements(rb_class_of((VALUE)(proc)), idTo_proc, ((void *)0));
12678 if (me) {
12679 b = rb_vm_call0(rb_current_execution_context(), proc, idTo_proc, 0, ((void *)0), me, 0);
12680 }
12681 else {
12682 b = rb_check_convert_type_with_id(proc, RUBY_T_DATA, "Proc", idTo_proc);
12683 }
12684 if (!((VALUE)(b) != ((VALUE)RUBY_Qnil)) || !rb_obj_is_proc(b)) {
12685 rb_raise(rb_eTypeError,
12686 "wrong argument type %s (expected Proc)",
12687 rb_obj_classname(proc));
12688 }
12689 return b;
12690 }
12691 else {
12692 return proc;
12693 }
12694}
12695static VALUE
12696refine_sym_proc_call(VALUE yielded_arg, VALUE callback_arg, int argc, const VALUE *argv, VALUE blockarg)
12697{
12698 VALUE obj;
12699 ID mid;
12702 const VALUE symbol = (rb_array_const_ptr_transient(callback_arg)[0]);
12703 const VALUE refinements = (rb_array_const_ptr_transient(callback_arg)[1]);
12704 int kw_splat = 3;
12705 VALUE v;
12706 VALUE ret;
12707 VALUE klass;
12708 if (argc-- < 1) {
12709 rb_raise(rb_eArgError, "no receiver given");
12710 }
12711 obj = *argv++;
12712 mid = (rb_sym2id(symbol));
12713 for (klass = rb_class_of((VALUE)(obj)); klass; klass = RCLASS_SUPER(klass)) {
12714 me = rb_callable_method_entry(klass, mid);
12715 if (me) {
12716 me = rb_resolve_refined_method_callable(refinements, me);
12717 if (me) break;
12718 }
12719 }
12720 ec = rb_current_execution_context();
12721 if (!!((VALUE)(blockarg) != ((VALUE)RUBY_Qnil))) {
12722 vm_passed_block_handler_set(ec, blockarg);
12723 }
12724 v = rb_adjust_argv_kw_splat(&argc, &argv, &kw_splat);
12725 if (!me) {
12726 ret = method_missing(obj, mid, argc, argv, MISSING_NOENTRY, kw_splat);
12727 }
12728 else {
12729 ret = rb_vm_call0(ec, obj, mid, argc, argv, me, kw_splat);
12730 }
12731 rb_free_tmp_buffer(&v);
12732 return ret;
12733}
12734static VALUE
12735vm_caller_setup_arg_block(const rb_execution_context_t *ec, rb_control_frame_t *reg_cfp,
12736 const struct rb_call_info *ci, const rb_iseq_t *blockiseq, const int is_super)
12737{
12738 if (ci->flag & (0x01 << VM_CALL_ARGS_BLOCKARG_bit)) {
12739 VALUE block_code = *(--reg_cfp->sp);
12740 if (!((VALUE)(block_code) != ((VALUE)RUBY_Qnil))) {
12741 return 0;
12742 }
12743 else if (block_code == rb_block_param_proxy) {
12744 ((void)0);
12745 VALUE handler = VM_CF_BLOCK_HANDLER(reg_cfp);
12746 reg_cfp->block_code = (const void *) handler;
12747 return handler;
12748 }
12749 else if (((((VALUE)(block_code)&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG)||(!(((VALUE)(block_code) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(block_code) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(block_code))->flags & RUBY_T_MASK) == (RUBY_T_SYMBOL))) && __extension__({ static struct rb_call_data rb_mbdp; (rb_cSymbol == ((VALUE)RUBY_Qfalse)) ? 1 : rb_method_basic_definition_p_with_cc(&rb_mbdp, rb_cSymbol, idTo_proc); })) {
12750 const rb_cref_t *cref = vm_env_cref(reg_cfp->ep);
12751 if (cref && !!((VALUE)(cref->refinements) != ((VALUE)RUBY_Qnil))) {
12752 VALUE ref = cref->refinements;
12753 VALUE func = rb_hash_lookup(ref, block_code);
12754 if (!((VALUE)(func) != ((VALUE)RUBY_Qnil))) {
12755 VALUE callback_arg = rb_ary_tmp_new(2);
12756 rb_ary_push(callback_arg, block_code);
12757 rb_ary_push(callback_arg, ref);
12758 (void)(((struct RBasic*)(callback_arg))->flags |= RUBY_FL_FREEZE);
12759 func = rb_func_proc_new(refine_sym_proc_call, callback_arg);
12760 rb_hash_aset(ref, block_code, func);
12761 }
12762 block_code = func;
12763 }
12764 return block_code;
12765 }
12766 else {
12767 return vm_to_proc(block_code);
12768 }
12769 }
12770 else if (blockiseq != ((void *)0)) {
12771 struct rb_captured_block *captured = VM_CFP_TO_CAPTURED_BLOCK(reg_cfp);
12772 captured->code.iseq = blockiseq;
12773 return VM_BH_FROM_ISEQ_BLOCK(captured);
12774 }
12775 else {
12776 if (is_super) {
12777 return ((VM_EP_LEP(((((reg_cfp)->ep)))))[(-1)]);
12778 }
12779 else {
12780 return 0;
12781 }
12782 }
12783}
12784static inline VALUE vm_call_iseq_setup_2(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd, int opt_pc, int param_size, int local_size);
12785__attribute__ ((__always_inline__)) static VALUE vm_call_iseq_setup_normal(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, const rb_callable_method_entry_t *me, int opt_pc, int param_size, int local_size);
12786static inline VALUE vm_call_iseq_setup_tailcall(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd, int opt_pc);
12787static VALUE vm_call_super_method(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, struct rb_calling_info *calling, struct rb_call_data *cd);
12788static VALUE vm_call_method_nome(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd);
12789static VALUE vm_call_method_each_type(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd);
12790static inline VALUE vm_call_method(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd);
12791static vm_call_handler vm_call_iseq_setup_func(const struct rb_call_info *ci, const int param_size, const int local_size);
12792static VALUE
12793vm_call_iseq_setup_tailcall_0start(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd)
12794{
12795 ((void)0);
12796 return vm_call_iseq_setup_tailcall(ec, cfp, calling, cd, 0);
12797}
12798static VALUE
12799vm_call_iseq_setup_normal_0start(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd)
12800{
12801 ((void)0);
12802 struct rb_call_cache *cc = &cd->cc;
12803 const rb_iseq_t *iseq = def_iseq_ptr(cc->me->def);
12804 int param = iseq->body->param.size;
12805 int local = iseq->body->local_table_size;
12806 return vm_call_iseq_setup_normal(ec, cfp, calling, cc->me, 0, param, local);
12807}
12808static _Bool
12809rb_simple_iseq_p(const rb_iseq_t *iseq)
12810{
12811 return iseq->body->param.flags.has_opt == 0 &&
12812 iseq->body->param.flags.has_rest == 0 &&
12813 iseq->body->param.flags.has_post == 0 &&
12814 iseq->body->param.flags.has_kw == 0 &&
12815 iseq->body->param.flags.has_kwrest == 0 &&
12816 iseq->body->param.flags.accepts_no_kwarg == 0 &&
12817 iseq->body->param.flags.has_block == 0;
12818}
12819static _Bool
12820rb_iseq_only_optparam_p(const rb_iseq_t *iseq)
12821{
12822 return iseq->body->param.flags.has_opt == 1 &&
12823 iseq->body->param.flags.has_rest == 0 &&
12824 iseq->body->param.flags.has_post == 0 &&
12825 iseq->body->param.flags.has_kw == 0 &&
12826 iseq->body->param.flags.has_kwrest == 0 &&
12827 iseq->body->param.flags.accepts_no_kwarg == 0 &&
12828 iseq->body->param.flags.has_block == 0;
12829}
12830static _Bool
12831rb_iseq_only_kwparam_p(const rb_iseq_t *iseq)
12832{
12833 return iseq->body->param.flags.has_opt == 0 &&
12834 iseq->body->param.flags.has_rest == 0 &&
12835 iseq->body->param.flags.has_post == 0 &&
12836 iseq->body->param.flags.has_kw == 1 &&
12837 iseq->body->param.flags.has_kwrest == 0 &&
12838 iseq->body->param.flags.has_block == 0;
12839}
12840static inline void
12841CALLER_SETUP_ARG(struct rb_control_frame_struct *__restrict cfp,
12842 struct rb_calling_info *__restrict calling,
12843 const struct rb_call_info *__restrict ci)
12844{
12845 if ((__builtin_expect(!!(((ci)->flag & (0x01 << VM_CALL_ARGS_SPLAT_bit))), 0))) {
12846 VALUE final_hash;
12847 vm_caller_setup_arg_splat(cfp, calling);
12848 if (!((ci)->flag & ((0x01 << VM_CALL_KWARG_bit) | (0x01 << VM_CALL_KW_SPLAT_bit))) &&
12849 calling->argc > 0 &&
12850 ( ((RUBY_T_HASH) == RUBY_T_FIXNUM) ? (((int)(long)((final_hash = *(cfp->sp - 1))))&RUBY_FIXNUM_FLAG) : ((RUBY_T_HASH) == RUBY_T_TRUE) ? (((final_hash = *(cfp->sp - 1))) == ((VALUE)RUBY_Qtrue)) : ((RUBY_T_HASH) == RUBY_T_FALSE) ? (((final_hash = *(cfp->sp - 1))) == ((VALUE)RUBY_Qfalse)) : ((RUBY_T_HASH) == RUBY_T_NIL) ? (((final_hash = *(cfp->sp - 1))) == ((VALUE)RUBY_Qnil)) : ((RUBY_T_HASH) == RUBY_T_UNDEF) ? (((final_hash = *(cfp->sp - 1))) == ((VALUE)RUBY_Qundef)) : ((RUBY_T_HASH) == RUBY_T_SYMBOL) ? ((((VALUE)((final_hash = *(cfp->sp - 1)))&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG)||(!(((VALUE)((final_hash = *(cfp->sp - 1))) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)((final_hash = *(cfp->sp - 1))) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)((final_hash = *(cfp->sp - 1))))->flags & RUBY_T_MASK) == (RUBY_T_SYMBOL))) : ((RUBY_T_HASH) == RUBY_T_FLOAT) ? ( ((((int)(long)((final_hash = *(cfp->sp - 1))))&RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG) || (!(((VALUE)((final_hash = *(cfp->sp - 1))) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)((final_hash = *(cfp->sp - 1))) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)((final_hash = *(cfp->sp - 1))))->flags & RUBY_T_MASK) == RUBY_T_FLOAT)) : (!(((VALUE)((final_hash = *(cfp->sp - 1))) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)((final_hash = *(cfp->sp - 1))) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)((final_hash = *(cfp->sp - 1))))->flags & RUBY_T_MASK) == (RUBY_T_HASH))) &&
12851 (((struct RHash *)final_hash)->basic.flags & RHASH_PASS_AS_KEYWORDS)) {
12852 *(cfp->sp - 1) = rb_hash_dup(final_hash);
12853 calling->kw_splat = 1;
12854 }
12855 }
12856 if ((__builtin_expect(!!(((ci)->flag & (0x01 << VM_CALL_KWARG_bit))), 0))) {
12857 vm_caller_setup_arg_kw(cfp, calling, ci);
12858 }
12859}
12860static inline void
12861CALLER_REMOVE_EMPTY_KW_SPLAT(struct rb_control_frame_struct *__restrict cfp,
12862 struct rb_calling_info *__restrict calling,
12863 const struct rb_call_info *__restrict ci)
12864{
12865 if ((__builtin_expect(!!(calling->kw_splat), 0))) {
12866 if ((((!(((struct RBasic*)((cfp->sp[-1])))->flags&(RHASH_ST_TABLE_FLAG))) ? ((unsigned int)((((struct RBasic*)(cfp->sp[-1]))->flags & (VALUE)RHASH_AR_TABLE_SIZE_MASK) >> RHASH_AR_TABLE_SIZE_SHIFT)) : ((((struct RHash*)(cfp->sp[-1]))->as.st)->num_entries)) == 0)) {
12867 cfp->sp--;
12868 calling->argc--;
12869 calling->kw_splat = 0;
12870 }
12871 }
12872}
12873static VALUE
12874vm_call_iseq_setup_normal_opt_start(rb_execution_context_t *ec, rb_control_frame_t *cfp,
12875 struct rb_calling_info *calling,
12876 struct rb_call_data *cd)
12877{
12878 const struct rb_call_cache *cc = &cd->cc;
12879 const rb_iseq_t *iseq = def_iseq_ptr(cc->me->def);
12880 const int lead_num = iseq->body->param.lead_num;
12881 const int opt = calling->argc - lead_num;
12882 const int opt_num = iseq->body->param.opt_num;
12883 const int opt_pc = (int)iseq->body->param.opt_table[opt];
12884 const int param = iseq->body->param.size;
12885 const int local = iseq->body->local_table_size;
12886 const int delta = opt_num - opt;
12887 ((void)0);
12888 return vm_call_iseq_setup_normal(ec, cfp, calling, cc->me, opt_pc, param - delta, local);
12889}
12890static VALUE
12891vm_call_iseq_setup_tailcall_opt_start(rb_execution_context_t *ec, rb_control_frame_t *cfp,
12892 struct rb_calling_info *calling,
12893 struct rb_call_data *cd)
12894{
12895 const struct rb_call_cache *cc = &cd->cc;
12896 const rb_iseq_t *iseq = def_iseq_ptr(cc->me->def);
12897 const int lead_num = iseq->body->param.lead_num;
12898 const int opt = calling->argc - lead_num;
12899 const int opt_pc = (int)iseq->body->param.opt_table[opt];
12900 ((void)0);
12901 return vm_call_iseq_setup_tailcall(ec, cfp, calling, cd, opt_pc);
12902}
12903static void
12904args_setup_kw_parameters(rb_execution_context_t *const ec, const rb_iseq_t *const iseq,
12905 VALUE *const passed_values, const int passed_keyword_len, const VALUE *const passed_keywords,
12906 VALUE *const locals);
12907static VALUE
12908vm_call_iseq_setup_kwparm_kwarg(rb_execution_context_t *ec, rb_control_frame_t *cfp,
12909 struct rb_calling_info *calling,
12910 struct rb_call_data *cd)
12911{
12912 const struct rb_kwarg_call_data *kcd = (void *)cd;
12913 const struct rb_call_info_with_kwarg *ci_kw = &kcd->ci_kw;
12914 const struct rb_call_cache *cc = &kcd->cc;
12915 ((void)0);
12916 ((void)0);
12917 const rb_iseq_t *iseq = def_iseq_ptr(cc->me->def);
12918 const struct rb_iseq_param_keyword *kw_param = iseq->body->param.keyword;
12919 const struct rb_call_info_kw_arg *kw_arg = ci_kw->kw_arg;
12920 const int ci_kw_len = kw_arg->keyword_len;
12921 const VALUE * const ci_keywords = kw_arg->keywords;
12922 VALUE *argv = cfp->sp - calling->argc;
12923 VALUE *const klocals = argv + kw_param->bits_start - kw_param->num;
12924 const int lead_num = iseq->body->param.lead_num;
12925 VALUE * const ci_kws = (VALUE*)__builtin_alloca_with_align((sizeof(VALUE)*(ci_kw_len)), _Alignof(VALUE) * 8);
12926 ruby_nonempty_memcpy((ci_kws), (argv + lead_num), sizeof(VALUE)*(size_t)(ci_kw_len));
12927 args_setup_kw_parameters(ec, iseq, ci_kws, ci_kw_len, ci_keywords, klocals);
12928 int param = iseq->body->param.size;
12929 int local = iseq->body->local_table_size;
12930 return vm_call_iseq_setup_normal(ec, cfp, calling, cc->me, 0, param, local);
12931}
12932static VALUE
12933vm_call_iseq_setup_kwparm_nokwarg(rb_execution_context_t *ec, rb_control_frame_t *cfp,
12934 struct rb_calling_info *calling,
12935 struct rb_call_data *cd)
12936{
12937 const struct rb_call_info *__attribute__ ((__unused__)) ci = &cd->ci;
12938 const struct rb_call_cache *cc = &cd->cc;
12939 ((void)0);
12940 ((void)0);
12941 const rb_iseq_t *iseq = def_iseq_ptr(cc->me->def);
12942 const struct rb_iseq_param_keyword *kw_param = iseq->body->param.keyword;
12943 VALUE * const argv = cfp->sp - calling->argc;
12944 VALUE * const klocals = argv + kw_param->bits_start - kw_param->num;
12945 int i;
12946 for (i=0; i<kw_param->num; i++) {
12947 klocals[i] = kw_param->default_values[i];
12948 }
12949 klocals[i] = (((VALUE)(0))<<1 | RUBY_FIXNUM_FLAG);
12950 int param = iseq->body->param.size;
12951 int local = iseq->body->local_table_size;
12952 return vm_call_iseq_setup_normal(ec, cfp, calling, cc->me, 0, param, local);
12953}
12954static inline int
12955vm_callee_setup_arg(rb_execution_context_t *ec, struct rb_calling_info *calling, struct rb_call_data *cd,
12956 const rb_iseq_t *iseq, VALUE *argv, int param_size, int local_size)
12957{
12958 const struct rb_call_info *ci = &cd->ci;
12959 struct rb_call_cache *cc = &cd->cc;
12960 if ((__builtin_expect(!!(!(ci->flag & (0x01 << VM_CALL_KW_SPLAT_bit))), 1))) {
12961 if ((__builtin_expect(!!(rb_simple_iseq_p(iseq)), 1))) {
12962 rb_control_frame_t *cfp = ec->cfp;
12963 CALLER_SETUP_ARG(cfp, calling, ci);
12964 CALLER_REMOVE_EMPTY_KW_SPLAT(cfp, calling, ci);
12965 if (calling->argc != iseq->body->param.lead_num) {
12966 argument_arity_error(ec, iseq, calling->argc, iseq->body->param.lead_num, iseq->body->param.lead_num);
12967 }
12968 CC_SET_FASTPATH(cc, vm_call_iseq_setup_func(ci, param_size, local_size), vm_call_iseq_optimizable_p(&cd->ci, &cd->cc));
12969 return 0;
12970 }
12971 else if (rb_iseq_only_optparam_p(iseq)) {
12972 rb_control_frame_t *cfp = ec->cfp;
12973 CALLER_SETUP_ARG(cfp, calling, ci);
12974 CALLER_REMOVE_EMPTY_KW_SPLAT(cfp, calling, ci);
12975 const int lead_num = iseq->body->param.lead_num;
12976 const int opt_num = iseq->body->param.opt_num;
12977 const int argc = calling->argc;
12978 const int opt = argc - lead_num;
12979 if (opt < 0 || opt > opt_num) {
12980 argument_arity_error(ec, iseq, argc, lead_num, lead_num + opt_num);
12981 }
12982 if ((__builtin_expect(!!(!(ci->flag & (0x01 << VM_CALL_TAILCALL_bit))), 1))) {
12983 CC_SET_FASTPATH(cc, vm_call_iseq_setup_normal_opt_start,
12984 !((ci)->flag & (0x01 << VM_CALL_ARGS_SPLAT_bit)) && !((ci)->flag & (0x01 << VM_CALL_KWARG_bit)) &&
12985 !((rb_method_visibility_t)(((cc->me)->flags & (((VALUE)RUBY_FL_USER4) | ((VALUE)RUBY_FL_USER5))) >> ((((VALUE)RUBY_FL_USHIFT) + 4)+0)) == METHOD_VISI_PROTECTED));
12986 }
12987 else {
12988 CC_SET_FASTPATH(cc, vm_call_iseq_setup_tailcall_opt_start,
12989 !((ci)->flag & (0x01 << VM_CALL_ARGS_SPLAT_bit)) && !((ci)->flag & (0x01 << VM_CALL_KWARG_bit)) &&
12990 !((rb_method_visibility_t)(((cc->me)->flags & (((VALUE)RUBY_FL_USER4) | ((VALUE)RUBY_FL_USER5))) >> ((((VALUE)RUBY_FL_USHIFT) + 4)+0)) == METHOD_VISI_PROTECTED));
12991 }
12992 ((void)0);
12993 for (int i=argc; i<lead_num + opt_num; i++) {
12994 argv[i] = ((VALUE)RUBY_Qnil);
12995 }
12996 return (int)iseq->body->param.opt_table[opt];
12997 }
12998 else if (rb_iseq_only_kwparam_p(iseq) && !((ci)->flag & (0x01 << VM_CALL_ARGS_SPLAT_bit))) {
12999 const int lead_num = iseq->body->param.lead_num;
13000 const int argc = calling->argc;
13001 const struct rb_iseq_param_keyword *kw_param = iseq->body->param.keyword;
13002 if (ci->flag & (0x01 << VM_CALL_KWARG_bit)) {
13003 const struct rb_call_info_kw_arg *kw_arg = ((struct rb_call_info_with_kwarg *)ci)->kw_arg;
13004 if (argc - kw_arg->keyword_len == lead_num) {
13005 const int ci_kw_len = kw_arg->keyword_len;
13006 const VALUE * const ci_keywords = kw_arg->keywords;
13007 VALUE * const ci_kws = (VALUE*)__builtin_alloca_with_align((sizeof(VALUE)*(ci_kw_len)), _Alignof(VALUE) * 8);
13008 ruby_nonempty_memcpy((ci_kws), (argv + lead_num), sizeof(VALUE)*(size_t)(ci_kw_len));
13009 VALUE *const klocals = argv + kw_param->bits_start - kw_param->num;
13010 args_setup_kw_parameters(ec, iseq, ci_kws, ci_kw_len, ci_keywords, klocals);
13011 CC_SET_FASTPATH(cc, vm_call_iseq_setup_kwparm_kwarg,
13012 !((rb_method_visibility_t)(((cc->me)->flags & (((VALUE)RUBY_FL_USER4) | ((VALUE)RUBY_FL_USER5))) >> ((((VALUE)RUBY_FL_USHIFT) + 4)+0)) == METHOD_VISI_PROTECTED));
13013 return 0;
13014 }
13015 }
13016 else if (argc == lead_num) {
13017 VALUE *const klocals = argv + kw_param->bits_start - kw_param->num;
13018 args_setup_kw_parameters(ec, iseq, ((void *)0), 0, ((void *)0), klocals);
13019 if (klocals[kw_param->num] == (((VALUE)(0))<<1 | RUBY_FIXNUM_FLAG)) {
13020 CC_SET_FASTPATH(cc, vm_call_iseq_setup_kwparm_nokwarg,
13021 !((rb_method_visibility_t)(((cc->me)->flags & (((VALUE)RUBY_FL_USER4) | ((VALUE)RUBY_FL_USER5))) >> ((((VALUE)RUBY_FL_USHIFT) + 4)+0)) == METHOD_VISI_PROTECTED));
13022 }
13023 return 0;
13024 }
13025 }
13026 }
13027 return setup_parameters_complex(ec, iseq, calling, ci, argv, arg_setup_method);
13028}
13029static VALUE
13030vm_call_iseq_setup(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd)
13031{
13032 ((void)0);
13033 const struct rb_call_cache *cc = &cd->cc;
13034 const rb_iseq_t *iseq = def_iseq_ptr(cc->me->def);
13035 const int param_size = iseq->body->param.size;
13036 const int local_size = iseq->body->local_table_size;
13037 const int opt_pc = vm_callee_setup_arg(ec, calling, cd, def_iseq_ptr(cc->me->def), cfp->sp - calling->argc, param_size, local_size);
13038 return vm_call_iseq_setup_2(ec, cfp, calling, cd, opt_pc, param_size, local_size);
13039}
13040static inline VALUE
13041vm_call_iseq_setup_2(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd,
13042 int opt_pc, int param_size, int local_size)
13043{
13044 const struct rb_call_info *ci = &cd->ci;
13045 const struct rb_call_cache *cc = &cd->cc;
13046 if ((__builtin_expect(!!(!(ci->flag & (0x01 << VM_CALL_TAILCALL_bit))), 1))) {
13047 return vm_call_iseq_setup_normal(ec, cfp, calling, cc->me, opt_pc, param_size, local_size);
13048 }
13049 else {
13050 return vm_call_iseq_setup_tailcall(ec, cfp, calling, cd, opt_pc);
13051 }
13052}
13053static inline VALUE
13054vm_call_iseq_setup_normal(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, const rb_callable_method_entry_t *me,
13055 int opt_pc, int param_size, int local_size)
13056{
13057 const rb_iseq_t *iseq = def_iseq_ptr(me->def);
13058 VALUE *argv = cfp->sp - calling->argc;
13059 VALUE *sp = argv + param_size;
13060 cfp->sp = argv - 1 ;
13061 vm_push_frame(ec, iseq, VM_FRAME_MAGIC_METHOD | VM_ENV_FLAG_LOCAL, calling->recv,
13062 calling->block_handler, (VALUE)me,
13063 iseq->body->iseq_encoded + opt_pc, sp,
13064 local_size - param_size,
13065 iseq->body->stack_max);
13066 return ((VALUE)RUBY_Qundef);
13067}
13068static inline VALUE
13069vm_call_iseq_setup_tailcall(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd,
13070 int opt_pc)
13071{
13072 const struct rb_call_cache *cc = &cd->cc;
13073 unsigned int i;
13074 VALUE *argv = cfp->sp - calling->argc;
13075 const rb_callable_method_entry_t *me = cc->me;
13076 const rb_iseq_t *iseq = def_iseq_ptr(me->def);
13077 VALUE *src_argv = argv;
13078 VALUE *sp_orig, *sp;
13079 VALUE finish_flag = VM_FRAME_FINISHED_P(cfp) ? VM_FRAME_FLAG_FINISH : 0;
13080 if (VM_BH_FROM_CFP_P(calling->block_handler, cfp)) {
13081 struct rb_captured_block *dst_captured = VM_CFP_TO_CAPTURED_BLOCK(((cfp)+1));
13082 const struct rb_captured_block *src_captured = VM_BH_TO_CAPT_BLOCK(calling->block_handler);
13083 dst_captured->code.val = src_captured->code.val;
13084 if (VM_BH_ISEQ_BLOCK_P(calling->block_handler)) {
13085 calling->block_handler = VM_BH_FROM_ISEQ_BLOCK(dst_captured);
13086 }
13087 else {
13088 calling->block_handler = VM_BH_FROM_IFUNC_BLOCK(dst_captured);
13089 }
13090 }
13091 vm_pop_frame(ec, cfp, cfp->ep);
13092 cfp = ec->cfp;
13093 sp_orig = sp = cfp->sp;
13094 sp[0] = calling->recv;
13095 sp++;
13096 for (i=0; i < iseq->body->param.size; i++) {
13097 *sp++ = src_argv[i];
13098 }
13099 vm_push_frame(ec, iseq, VM_FRAME_MAGIC_METHOD | VM_ENV_FLAG_LOCAL | finish_flag,
13100 calling->recv, calling->block_handler, (VALUE)me,
13101 iseq->body->iseq_encoded + opt_pc, sp,
13102 iseq->body->local_table_size - iseq->body->param.size,
13103 iseq->body->stack_max);
13104 cfp->sp = sp_orig;
13105 return ((VALUE)RUBY_Qundef);
13106}
13107static VALUE
13108call_cfunc_m2(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
13109{
13110 return (*func)(recv, rb_ary_new_from_values(argc, argv));
13111}
13112static VALUE
13113call_cfunc_m1(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
13114{
13115 return (*func)(argc, argv, recv);
13116}
13117static VALUE
13118call_cfunc_0(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
13119{
13120 VALUE(*f)(VALUE) = (VALUE(*)(VALUE))func;
13121 return (*f)(recv);
13122}
13123static VALUE
13124call_cfunc_1(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
13125{
13126 VALUE(*f)(VALUE, VALUE) = (VALUE(*)(VALUE, VALUE))func;
13127 return (*f)(recv, argv[0]);
13128}
13129static VALUE
13130call_cfunc_2(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
13131{
13132 VALUE(*f)(VALUE, VALUE, VALUE) = (VALUE(*)(VALUE, VALUE, VALUE))func;
13133 return (*f)(recv, argv[0], argv[1]);
13134}
13135static VALUE
13136call_cfunc_3(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
13137{
13138 VALUE(*f)(VALUE, VALUE, VALUE, VALUE) = (VALUE(*)(VALUE, VALUE, VALUE, VALUE))func;
13139 return (*f)(recv, argv[0], argv[1], argv[2]);
13140}
13141static VALUE
13142call_cfunc_4(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
13143{
13144 VALUE(*f)(VALUE, VALUE, VALUE, VALUE, VALUE) = (VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE))func;
13145 return (*f)(recv, argv[0], argv[1], argv[2], argv[3]);
13146}
13147static VALUE
13148call_cfunc_5(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
13149{
13150 VALUE(*f)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE) = (VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE))func;
13151 return (*f)(recv, argv[0], argv[1], argv[2], argv[3], argv[4]);
13152}
13153static VALUE
13154call_cfunc_6(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
13155{
13157 return (*f)(recv, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5]);
13158}
13159static VALUE
13160call_cfunc_7(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
13161{
13163 return (*f)(recv, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6]);
13164}
13165static VALUE
13166call_cfunc_8(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
13167{
13169 return (*f)(recv, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7]);
13170}
13171static VALUE
13172call_cfunc_9(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
13173{
13175 return (*f)(recv, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8]);
13176}
13177static VALUE
13178call_cfunc_10(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
13179{
13181 return (*f)(recv, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8], argv[9]);
13182}
13183static VALUE
13184call_cfunc_11(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
13185{
13187 return (*f)(recv, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8], argv[9], argv[10]);
13188}
13189static VALUE
13190call_cfunc_12(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
13191{
13193 return (*f)(recv, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8], argv[9], argv[10], argv[11]);
13194}
13195static VALUE
13196call_cfunc_13(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
13197{
13199 return (*f)(recv, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8], argv[9], argv[10], argv[11], argv[12]);
13200}
13201static VALUE
13202call_cfunc_14(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
13203{
13205 return (*f)(recv, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8], argv[9], argv[10], argv[11], argv[12], argv[13]);
13206}
13207static VALUE
13208call_cfunc_15(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
13209{
13211 return (*f)(recv, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8], argv[9], argv[10], argv[11], argv[12], argv[13], argv[14]);
13212}
13213static inline int
13214vm_cfp_consistent_p(rb_execution_context_t *ec, const rb_control_frame_t *reg_cfp)
13215{
13216 const int ov_flags = RAISED_STACKOVERFLOW;
13217 if ((__builtin_expect(!!(reg_cfp == ec->cfp + 1), 1))) return 1;
13218 if ((((ec)->raised_flag & (ov_flags)) != 0)) {
13219 ((ec)->raised_flag &= ~(ov_flags));
13220 return 1;
13221 }
13222 return 0;
13223}
13224static inline
13225const rb_method_cfunc_t *
13226vm_method_cfunc_entry(const rb_callable_method_entry_t *me)
13227{
13228 return __extension__({
13229 ;
13230 ; typeof(&(me->def)->body.cfunc) unaligned_member_access_result = (&(me->def)->body.cfunc);
13231 ; unaligned_member_access_result; });
13232}
13233static VALUE
13234vm_call_cfunc_with_frame(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, struct rb_calling_info *calling, struct rb_call_data *cd, int empty_kw_splat)
13235{
13236 const struct rb_call_info *ci = &cd->ci;
13237 const struct rb_call_cache *cc = &cd->cc;
13238 VALUE val;
13239 const rb_callable_method_entry_t *me = cc->me;
13240 const rb_method_cfunc_t *cfunc = vm_method_cfunc_entry(me);
13241 int len = cfunc->argc;
13242 VALUE recv = calling->recv;
13243 VALUE block_handler = calling->block_handler;
13244 VALUE frame_type = VM_FRAME_MAGIC_CFUNC | VM_FRAME_FLAG_CFRAME | VM_ENV_FLAG_LOCAL;
13245 int argc = calling->argc;
13246 int orig_argc = argc;
13247 if ((__builtin_expect(!!(calling->kw_splat), 0))) {
13248 frame_type |= VM_FRAME_FLAG_CFRAME_KW;
13249 }
13250 else if ((__builtin_expect(!!(empty_kw_splat), 0))) {
13251 frame_type |= VM_FRAME_FLAG_CFRAME_EMPTY_KW;
13252 }
13253 do { if ((__builtin_expect(!!(0), 0))) { struct ruby_dtrace_method_hook_args args; if (rb_dtrace_setup(ec, me->owner, me->def->original_id, &args)) { do {} while (0); } } } while (0);
13254 do { const rb_event_flag_t flag_arg_ = (0x0020); rb_hook_list_t *hooks_arg_ = (rb_vm_global_hooks(ec)); if ((__builtin_expect(!!((hooks_arg_)->events & (flag_arg_)), 0))) { rb_exec_event_hook_orig(ec, hooks_arg_, flag_arg_, recv, me->def->original_id, ci->mid, me->owner, ((VALUE)RUBY_Qundef), 0); } } while (0);
13255 vm_push_frame(ec, ((void *)0), frame_type, recv,
13256 block_handler, (VALUE)me,
13257 0, ec->cfp->sp, 0, 0);
13258 if (len >= 0) rb_check_arity(argc, len, len);
13259 reg_cfp->sp -= orig_argc + 1;
13260 val = (*cfunc->invoker)(recv, argc, reg_cfp->sp + 1, cfunc->func);
13261 ((__builtin_expect(!!(vm_cfp_consistent_p(ec, reg_cfp)), 1)) ? (void)0 : rb_bug("vm_call_cfunc" ": cfp consistency error (%p, %p)", (void *)reg_cfp, (void *)(ec->cfp+1)));
13262 rb_vm_pop_frame(ec);
13263 do { const rb_event_flag_t flag_arg_ = (0x0040); rb_hook_list_t *hooks_arg_ = (rb_vm_global_hooks(ec)); if ((__builtin_expect(!!((hooks_arg_)->events & (flag_arg_)), 0))) { rb_exec_event_hook_orig(ec, hooks_arg_, flag_arg_, recv, me->def->original_id, ci->mid, me->owner, val, 0); } } while (0);
13264 do { if ((__builtin_expect(!!(0), 0))) { struct ruby_dtrace_method_hook_args args; if (rb_dtrace_setup(ec, me->owner, me->def->original_id, &args)) { do {} while (0); } } } while (0);
13265 return val;
13266}
13267static VALUE
13268vm_call_cfunc(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, struct rb_calling_info *calling, struct rb_call_data *cd)
13269{
13270 const struct rb_call_info *ci = &cd->ci;
13271 int empty_kw_splat;
13272 ((void)0);
13273 CALLER_SETUP_ARG(reg_cfp, calling, ci);
13274 empty_kw_splat = calling->kw_splat;
13275 CALLER_REMOVE_EMPTY_KW_SPLAT(reg_cfp, calling, ci);
13276 if (empty_kw_splat && calling->kw_splat) {
13277 empty_kw_splat = 0;
13278 }
13279 return vm_call_cfunc_with_frame(ec, reg_cfp, calling, cd, empty_kw_splat);
13280}
13281static VALUE
13282vm_call_ivar(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd)
13283{
13284 struct rb_call_cache *cc = &cd->cc;
13285 ((void)0);
13286 cfp->sp -= 1;
13287 return vm_getivar(calling->recv, cc->me->def->body.attr.id, ((void *)0), cc, 1);
13288}
13289static VALUE
13290vm_call_attrset(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd)
13291{
13292 struct rb_call_cache *cc = &cd->cc;
13293 ((void)0);
13294 VALUE val = *(cfp->sp - 1);
13295 cfp->sp -= 2;
13296 return vm_setivar(calling->recv, cc->me->def->body.attr.id, val, ((void *)0), cc, 1);
13297}
13298static inline VALUE
13299vm_call_bmethod_body(rb_execution_context_t *ec, struct rb_calling_info *calling, struct rb_call_data *cd, const VALUE *argv)
13300{
13301 rb_proc_t *proc;
13302 VALUE val;
13303 const struct rb_call_cache *cc = &cd->cc;
13304 (((proc)) = (rb_proc_t*)(((struct RData*)(((cc->me->def->body.bmethod.proc))))->data));
13305 val = rb_vm_invoke_bmethod(ec, proc, calling->recv, calling->argc, argv, calling->kw_splat, calling->block_handler, cc->me);
13306 return val;
13307}
13308static VALUE
13309vm_call_bmethod(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd)
13310{
13311 ((void)0);
13312 VALUE *argv;
13313 int argc;
13314 const struct rb_call_info *ci = &cd->ci;
13315 CALLER_SETUP_ARG(cfp, calling, ci);
13316 argc = calling->argc;
13317 argv = (VALUE*)__builtin_alloca_with_align((sizeof(VALUE)*(argc)), _Alignof(VALUE) * 8);
13318 ruby_nonempty_memcpy((argv), (cfp->sp - argc), sizeof(VALUE)*(size_t)(argc));
13319 cfp->sp += - argc - 1;
13320 return vm_call_bmethod_body(ec, calling, cd, argv);
13321}
13322static enum method_missing_reason
13323ci_missing_reason(const struct rb_call_info *ci)
13324{
13325 enum method_missing_reason stat = MISSING_NOENTRY;
13326 if (ci->flag & (0x01 << VM_CALL_VCALL_bit)) stat |= MISSING_VCALL;
13327 if (ci->flag & (0x01 << VM_CALL_FCALL_bit)) stat |= MISSING_FCALL;
13328 if (ci->flag & (0x01 << VM_CALL_SUPER_bit)) stat |= MISSING_SUPER;
13329 return stat;
13330}
13331static VALUE
13332vm_call_opt_send(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, struct rb_calling_info *calling, struct rb_call_data *orig_cd)
13333{
13334 ((void)0);
13335 int i;
13336 VALUE sym;
13337 const struct rb_call_info *orig_ci = &orig_cd->ci;
13338 const struct rb_call_cache *orig_cc = &orig_cd->cc;
13339 struct rb_call_info *ci;
13340 struct rb_call_cache *cc;
13341 struct rb_kwarg_call_data cd;
13342 CALLER_SETUP_ARG(reg_cfp, calling, orig_ci);
13343 i = calling->argc - 1;
13344 if (calling->argc == 0) {
13345 rb_raise(rb_eArgError, "no method name given");
13346 }
13347 if (orig_ci->flag & (0x01 << VM_CALL_KWARG_bit)) {
13348 const struct rb_kwarg_call_data *orig_kcd = (void *)orig_cd;
13349 cd = *orig_kcd;
13350 }
13351 else {
13352 cd.ci_kw.ci = *orig_ci;
13353 cd.cc = *orig_cc;
13354 }
13355 ci = &cd.ci_kw.ci;
13356 cc = &cd.cc;
13357 sym = (*(((((reg_cfp)->sp)))-(i)-1));
13358 if (!(ci->mid = rb_check_id(&sym))) {
13359 if (__extension__({ static struct rb_call_data rb_mbdp; (rb_class_of((VALUE)(calling->recv)) == ((VALUE)RUBY_Qfalse)) ? 1 : rb_method_basic_definition_p_with_cc(&rb_mbdp, rb_class_of((VALUE)(calling->recv)), idMethodMissing); })) {
13360 VALUE exc =
13361 rb_make_no_method_exception(rb_eNoMethodError, 0, calling->recv,
13362 rb_long2int_inline(calling->argc), &(*(((((reg_cfp)->sp)))-(i)-1)),
13363 ci->flag & ((0x01 << VM_CALL_FCALL_bit)|(0x01 << VM_CALL_VCALL_bit)));
13364 rb_exc_raise(exc);
13365 }
13366 (*(((((reg_cfp)->sp)))-(i)-1)) = rb_str_intern(sym);
13367 ci->mid = idMethodMissing;
13368 ec->method_missing_reason = cc->aux.method_missing_reason = ci_missing_reason(ci);
13369 }
13370 else {
13371 if (i > 0) {
13372 memmove((&(*(((((reg_cfp)->sp)))-(i)-1))), (&(*(((((reg_cfp)->sp)))-(i-1)-1))), sizeof(VALUE)*(size_t)(i));
13373 }
13374 calling->argc -= 1;
13375 (((reg_cfp)->sp) -= (((1))));
13376 }
13377 CC_SET_ME(cc, rb_callable_method_entry_with_refinements(rb_class_of((VALUE)(calling->recv)), ci->mid, ((void *)0)));
13378 ci->flag = (0x01 << VM_CALL_FCALL_bit) | (0x01 << VM_CALL_OPT_SEND_bit) | (calling->kw_splat ? (0x01 << VM_CALL_KW_SPLAT_bit) : 0);
13379 return vm_call_method(ec, reg_cfp, calling, (CALL_DATA)&cd);
13380}
13381static inline VALUE vm_invoke_block(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, struct rb_calling_info *calling, const struct rb_call_info *ci, VALUE block_handler);
13382__attribute__ ((__noinline__)) static VALUE vm_invoke_block_opt_call(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, struct rb_calling_info *calling, const struct rb_call_info *ci, VALUE block_handler);
13383static VALUE
13384vm_invoke_block_opt_call(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp,
13385 struct rb_calling_info *calling, const struct rb_call_info *ci, VALUE block_handler)
13386{
13387 int argc = calling->argc;
13388 if (argc > 0) memmove((&(*(((((reg_cfp)->sp)))-(argc)-1))), (&(*(((((reg_cfp)->sp)))-(argc-1)-1))), sizeof(VALUE)*(size_t)(argc));
13389 (((reg_cfp)->sp) -= (((1))));
13390 return vm_invoke_block(ec, reg_cfp, calling, ci, block_handler);
13391}
13392static VALUE
13393vm_call_opt_call(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, struct rb_calling_info *calling, struct rb_call_data *cd)
13394{
13395 ((void)0);
13396 const struct rb_call_info *ci = &cd->ci;
13397 VALUE procval = calling->recv;
13398 return vm_invoke_block_opt_call(ec, reg_cfp, calling, ci, VM_BH_FROM_PROC(procval));
13399}
13400static VALUE
13401vm_call_opt_block_call(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, struct rb_calling_info *calling, struct rb_call_data *cd)
13402{
13403 ((void)0);
13404 VALUE block_handler = VM_ENV_BLOCK_HANDLER(VM_CF_LEP(reg_cfp));
13405 const struct rb_call_info *ci = &cd->ci;
13406 if (((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_CALL)]&((1 << 12))) == 0), 1)))) {
13407 return vm_invoke_block_opt_call(ec, reg_cfp, calling, ci, block_handler);
13408 }
13409 else {
13410 calling->recv = rb_vm_bh_to_procval(ec, block_handler);
13411 vm_search_method(cd, calling->recv);
13412 return vm_call_general(ec, reg_cfp, calling, cd);
13413 }
13414}
13415static VALUE
13416vm_call_method_missing(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, struct rb_calling_info *calling, struct rb_call_data *orig_cd)
13417{
13418 ((void)0);
13419 const struct rb_call_info *orig_ci = &orig_cd->ci;
13420 const struct rb_call_cache *orig_cc = &orig_cd->cc;
13421 VALUE *argv = (((((reg_cfp)->sp)))-(calling->argc));
13422 struct rb_call_data cd = *orig_cd;
13423 unsigned int argc;
13424 CALLER_SETUP_ARG(reg_cfp, calling, orig_ci);
13425 argc = calling->argc+1;
13426 cd.ci.flag = (0x01 << VM_CALL_FCALL_bit) | (0x01 << VM_CALL_OPT_SEND_bit) | (calling->kw_splat ? (0x01 << VM_CALL_KW_SPLAT_bit) : 0);
13427 cd.ci.mid = idMethodMissing;
13428 cd.ci.orig_argc = argc;
13429 cd.cc.me =
13430 rb_callable_method_entry_without_refinements(rb_class_of((VALUE)(calling->recv)),
13431 idMethodMissing, ((void *)0));
13432 calling->argc = argc;
13433 if ((__builtin_expect(!!(!(!(1/!!(sizeof(*((reg_cfp)->sp)) == sizeof(VALUE))) || !(1/!!(sizeof(*(reg_cfp)) == sizeof(rb_control_frame_t))) || ((rb_control_frame_t *)(((reg_cfp)->sp) + (1)) + 1) >= (reg_cfp))), 1))) {(void)0;} else vm_stackoverflow();
13434 ;
13435 if (argc > 1) {
13436 memmove((argv+1), (argv), sizeof(VALUE)*(size_t)(argc-1));
13437 }
13438 argv[0] = (rb_id2sym(orig_ci->mid));
13439 (((reg_cfp)->sp) += (((1))));
13440 ec->method_missing_reason = orig_cc->aux.method_missing_reason;
13441 return vm_call_method(ec, reg_cfp, calling, &cd);
13442}
13443static const rb_callable_method_entry_t *refined_method_callable_without_refinement(const rb_callable_method_entry_t *me);
13444static VALUE
13445vm_call_zsuper(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd, VALUE klass)
13446{
13447 ((void)0);
13448 const struct rb_call_info *ci = &cd->ci;
13449 struct rb_call_cache *cc = &cd->cc;
13450 klass = RCLASS_SUPER(klass);
13451 CC_SET_ME(cc, klass ? rb_callable_method_entry(klass, ci->mid) : ((void *)0));
13452 if (!cc->me) {
13453 return vm_call_method_nome(ec, cfp, calling, cd);
13454 }
13455 if (cc->me->def->type == VM_METHOD_TYPE_REFINED &&
13456 cc->me->def->body.refined.orig_me) {
13457 CC_SET_ME(cc, refined_method_callable_without_refinement(cc->me));
13458 }
13459 return vm_call_method_each_type(ec, cfp, calling, cd);
13460}
13461static inline VALUE
13462find_refinement(VALUE refinements, VALUE klass)
13463{
13464 if (!((VALUE)(refinements) != ((VALUE)RUBY_Qnil))) {
13465 return ((VALUE)RUBY_Qnil);
13466 }
13467 return rb_hash_lookup(refinements, klass);
13468}
13469__attribute__ ((__pure__)) static rb_control_frame_t * current_method_entry(const rb_execution_context_t *ec, rb_control_frame_t *cfp);
13470static rb_control_frame_t *
13471current_method_entry(const rb_execution_context_t *ec, rb_control_frame_t *cfp)
13472{
13473 rb_control_frame_t *top_cfp = cfp;
13474 if (cfp->iseq && cfp->iseq->body->type == ISEQ_TYPE_BLOCK) {
13475 const rb_iseq_t *local_iseq = cfp->iseq->body->local_iseq;
13476 do {
13477 cfp = ((cfp)+1);
13478 if (RUBY_VM_CONTROL_FRAME_STACK_OVERFLOW_P(ec, cfp)) {
13479 return top_cfp;
13480 }
13481 } while (cfp->iseq != local_iseq);
13482 }
13483 return cfp;
13484}
13485static VALUE
13486find_defined_class_by_owner(VALUE current_class, VALUE target_owner)
13487{
13488 VALUE klass = current_class;
13489 if (( ((RUBY_T_ICLASS) == RUBY_T_FIXNUM) ? (((int)(long)(klass))&RUBY_FIXNUM_FLAG) : ((RUBY_T_ICLASS) == RUBY_T_TRUE) ? ((klass) == ((VALUE)RUBY_Qtrue)) : ((RUBY_T_ICLASS) == RUBY_T_FALSE) ? ((klass) == ((VALUE)RUBY_Qfalse)) : ((RUBY_T_ICLASS) == RUBY_T_NIL) ? ((klass) == ((VALUE)RUBY_Qnil)) : ((RUBY_T_ICLASS) == RUBY_T_UNDEF) ? ((klass) == ((VALUE)RUBY_Qundef)) : ((RUBY_T_ICLASS) == RUBY_T_SYMBOL) ? ((((VALUE)(klass)&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG)||(!(((VALUE)(klass) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(klass) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(klass))->flags & RUBY_T_MASK) == (RUBY_T_SYMBOL))) : ((RUBY_T_ICLASS) == RUBY_T_FLOAT) ? ( ((((int)(long)(klass))&RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG) || (!(((VALUE)(klass) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(klass) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(klass))->flags & RUBY_T_MASK) == RUBY_T_FLOAT)) : (!(((VALUE)(klass) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(klass) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(klass))->flags & RUBY_T_MASK) == (RUBY_T_ICLASS))) && ((!(((VALUE)(klass) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(klass) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(klass))->flags & RUBY_T_MASK) != RUBY_T_NODE)?(((struct RBasic*)((klass)))->flags&((((VALUE)RUBY_FL_USER5)))):0)) klass = (((struct RBasic*)(klass))->klass);
13490 while (!(((VALUE)(klass) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) {
13491 VALUE owner = ( ((RUBY_T_ICLASS) == RUBY_T_FIXNUM) ? (((int)(long)(klass))&RUBY_FIXNUM_FLAG) : ((RUBY_T_ICLASS) == RUBY_T_TRUE) ? ((klass) == ((VALUE)RUBY_Qtrue)) : ((RUBY_T_ICLASS) == RUBY_T_FALSE) ? ((klass) == ((VALUE)RUBY_Qfalse)) : ((RUBY_T_ICLASS) == RUBY_T_NIL) ? ((klass) == ((VALUE)RUBY_Qnil)) : ((RUBY_T_ICLASS) == RUBY_T_UNDEF) ? ((klass) == ((VALUE)RUBY_Qundef)) : ((RUBY_T_ICLASS) == RUBY_T_SYMBOL) ? ((((VALUE)(klass)&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG)||(!(((VALUE)(klass) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(klass) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(klass))->flags & RUBY_T_MASK) == (RUBY_T_SYMBOL))) : ((RUBY_T_ICLASS) == RUBY_T_FLOAT) ? ( ((((int)(long)(klass))&RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG) || (!(((VALUE)(klass) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(klass) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(klass))->flags & RUBY_T_MASK) == RUBY_T_FLOAT)) : (!(((VALUE)(klass) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(klass) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(klass))->flags & RUBY_T_MASK) == (RUBY_T_ICLASS))) ? (((struct RBasic*)(klass))->klass) : klass;
13492 if (owner == target_owner) {
13493 return klass;
13494 }
13496 }
13497 return current_class;
13498}
13499static const rb_callable_method_entry_t *
13500aliased_callable_method_entry(const rb_callable_method_entry_t *me)
13501{
13502 const rb_method_entry_t *orig_me = me->def->body.alias.original_me;
13503 const rb_callable_method_entry_t *cme;
13504 if (orig_me->defined_class == 0) {
13505 VALUE defined_class = find_defined_class_by_owner(me->defined_class, orig_me->owner);
13506 ((void)0);
13507 cme = rb_method_entry_complement_defined_class(orig_me, me->called_id, defined_class);
13508 if (me->def->alias_count + me->def->complemented_count == 0) {
13509 __extension__({
13510 ;
13511 ; typeof(rb_obj_write((VALUE)(me), (VALUE *)(&me->def->body.alias.original_me), (VALUE)(cme), "./vm_insnhelper.c", 2828)) unaligned_member_access_result = (rb_obj_write((VALUE)(me), (VALUE *)(&me->def->body.alias.original_me), (VALUE)(cme), "./vm_insnhelper.c", 2828));
13512 ; unaligned_member_access_result; });
13513 }
13514 else {
13516 rb_method_definition_create(VM_METHOD_TYPE_ALIAS, me->def->original_id);
13517 rb_method_definition_set((rb_method_entry_t *)me, def, (void *)cme);
13518 }
13519 }
13520 else {
13521 cme = (const rb_callable_method_entry_t *)orig_me;
13522 }
13523 ((void)0);
13524 return cme;
13525}
13526static const rb_callable_method_entry_t *
13527refined_method_callable_without_refinement(const rb_callable_method_entry_t *me)
13528{
13529 const rb_method_entry_t *orig_me = me->def->body.refined.orig_me;
13530 const rb_callable_method_entry_t *cme;
13531 if (orig_me->defined_class == 0) {
13532 cme = ((void *)0);
13534 }
13535 else {
13536 cme = (const rb_callable_method_entry_t *)orig_me;
13537 }
13538 ((void)0);
13539 if ((!(cme) || !(cme)->def || (cme)->def->type == VM_METHOD_TYPE_UNDEF)) {
13540 cme = ((void *)0);
13541 }
13542 return cme;
13543}
13544static int
13545search_refined_method(rb_execution_context_t *ec, rb_control_frame_t *cfp, ID mid, struct rb_call_cache *cc)
13546{
13547 const rb_cref_t *cref = vm_get_cref(cfp->ep);
13548 for (; cref; cref = CREF_NEXT(cref)) {
13549 const VALUE refinement = find_refinement(CREF_REFINEMENTS(cref), cc->me->owner);
13550 if (!((VALUE)(refinement) != ((VALUE)RUBY_Qnil))) continue;
13551 const rb_callable_method_entry_t *const ref_me =
13552 rb_callable_method_entry(refinement, mid);
13553 if (ref_me) {
13554 if (cc->call == vm_call_super_method) {
13555 const rb_control_frame_t *top_cfp = current_method_entry(ec, cfp);
13556 const rb_callable_method_entry_t *top_me = rb_vm_frame_method_entry(top_cfp);
13557 if (top_me && rb_method_definition_eq(ref_me->def, top_me->def)) {
13558 continue;
13559 }
13560 }
13561 if (cc->me->def->type != VM_METHOD_TYPE_REFINED ||
13562 cc->me->def != ref_me->def) {
13563 CC_SET_ME(cc, ref_me);
13564 }
13565 if (ref_me->def->type != VM_METHOD_TYPE_REFINED) {
13566 return 1;
13567 }
13568 }
13569 else {
13570 CC_SET_ME(cc, ((void *)0));
13571 return 0;
13572 }
13573 }
13574 if (cc->me->def->body.refined.orig_me) {
13575 CC_SET_ME(cc, refined_method_callable_without_refinement(cc->me));
13576 }
13577 else {
13578 VALUE klass = RCLASS_SUPER(cc->me->defined_class);
13579 CC_SET_ME(cc, klass ? rb_callable_method_entry(klass, mid) : ((void *)0));
13580 }
13581 return 1;
13582}
13583static VALUE
13584vm_call_method_each_type(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd)
13585{
13586 const struct rb_call_info *ci = &cd->ci;
13587 struct rb_call_cache *cc = &cd->cc;
13588 switch (cc->me->def->type) {
13589 case VM_METHOD_TYPE_ISEQ:
13590 CC_SET_FASTPATH(cc, vm_call_iseq_setup, 1);
13591 return vm_call_iseq_setup(ec, cfp, calling, cd);
13592 case VM_METHOD_TYPE_NOTIMPLEMENTED:
13593 case VM_METHOD_TYPE_CFUNC:
13594 CC_SET_FASTPATH(cc, vm_call_cfunc, 1);
13595 return vm_call_cfunc(ec, cfp, calling, cd);
13596 case VM_METHOD_TYPE_ATTRSET:
13597 CALLER_SETUP_ARG(cfp, calling, ci);
13598 if (calling->argc == 1 && calling->kw_splat && (((!(((struct RBasic*)((cfp->sp[-1])))->flags&(RHASH_ST_TABLE_FLAG))) ? ((unsigned int)((((struct RBasic*)(cfp->sp[-1]))->flags & (VALUE)RHASH_AR_TABLE_SIZE_MASK) >> RHASH_AR_TABLE_SIZE_SHIFT)) : ((((struct RHash*)(cfp->sp[-1]))->as.st)->num_entries)) == 0)) {
13599 rb_warn_keyword_to_last_hash(ec, calling, ci, ((void *)0));
13600 }
13601 else {
13602 CALLER_REMOVE_EMPTY_KW_SPLAT(cfp, calling, ci);
13603 }
13604 rb_check_arity(calling->argc, 1, 1);
13605 cc->aux.index = 0;
13606 CC_SET_FASTPATH(cc, vm_call_attrset, !((ci->flag & (0x01 << VM_CALL_ARGS_SPLAT_bit)) || (ci->flag & (0x01 << VM_CALL_KWARG_bit))));
13607 return vm_call_attrset(ec, cfp, calling, cd);
13608 case VM_METHOD_TYPE_IVAR:
13609 CALLER_SETUP_ARG(cfp, calling, ci);
13610 CALLER_REMOVE_EMPTY_KW_SPLAT(cfp, calling, ci);
13611 rb_check_arity(calling->argc, 0, 0);
13612 cc->aux.index = 0;
13613 CC_SET_FASTPATH(cc, vm_call_ivar, !(ci->flag & (0x01 << VM_CALL_ARGS_SPLAT_bit)));
13614 return vm_call_ivar(ec, cfp, calling, cd);
13615 case VM_METHOD_TYPE_MISSING:
13616 cc->aux.method_missing_reason = 0;
13617 CC_SET_FASTPATH(cc, vm_call_method_missing, 1);
13618 return vm_call_method_missing(ec, cfp, calling, cd);
13619 case VM_METHOD_TYPE_BMETHOD:
13620 CC_SET_FASTPATH(cc, vm_call_bmethod, 1);
13621 return vm_call_bmethod(ec, cfp, calling, cd);
13622 case VM_METHOD_TYPE_ALIAS:
13623 CC_SET_ME(cc, aliased_callable_method_entry(cc->me));
13624 ((void)0);
13625 return vm_call_method_each_type(ec, cfp, calling, cd);
13626 case VM_METHOD_TYPE_OPTIMIZED:
13627 switch (cc->me->def->body.optimize_type) {
13628 case OPTIMIZED_METHOD_TYPE_SEND:
13629 CC_SET_FASTPATH(cc, vm_call_opt_send, 1);
13630 return vm_call_opt_send(ec, cfp, calling, cd);
13631 case OPTIMIZED_METHOD_TYPE_CALL:
13632 CC_SET_FASTPATH(cc, vm_call_opt_call, 1);
13633 return vm_call_opt_call(ec, cfp, calling, cd);
13634 case OPTIMIZED_METHOD_TYPE_BLOCK_CALL:
13635 CC_SET_FASTPATH(cc, vm_call_opt_block_call, 1);
13636 return vm_call_opt_block_call(ec, cfp, calling, cd);
13637 default:
13638 rb_bug("vm_call_method: unsupported optimized method type (%d)",
13639 cc->me->def->body.optimize_type);
13640 }
13641 case VM_METHOD_TYPE_UNDEF:
13642 break;
13643 case VM_METHOD_TYPE_ZSUPER:
13644 return vm_call_zsuper(ec, cfp, calling, cd, ((((struct RClass*)(cc->me->defined_class))->ptr)->origin_));
13645 case VM_METHOD_TYPE_REFINED:
13646 if (search_refined_method(ec, cfp, ci->mid, cc))
13647 return vm_call_method(ec, cfp, calling, cd);
13648 else
13649 return vm_call_method_nome(ec, cfp, calling, cd);
13650 }
13651 rb_bug("vm_call_method: unsupported method type (%d)", cc->me->def->type);
13652}
13653__attribute__ ((__noreturn__)) static void vm_raise_method_missing(rb_execution_context_t *ec, int argc, const VALUE *argv, VALUE obj, int call_status);
13654static VALUE
13655vm_call_method_nome(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd)
13656{
13657 const struct rb_call_info *ci = &cd->ci;
13658 struct rb_call_cache *cc = &cd->cc;
13659 const int stat = ci_missing_reason(ci);
13660 if (ci->mid == idMethodMissing) {
13661 rb_control_frame_t *reg_cfp = cfp;
13662 VALUE *argv = (((((reg_cfp)->sp)))-(calling->argc));
13663 vm_raise_method_missing(ec, calling->argc, argv, calling->recv, stat);
13664 }
13665 else {
13666 cc->aux.method_missing_reason = stat;
13667 CC_SET_FASTPATH(cc, vm_call_method_missing, 1);
13668 return vm_call_method_missing(ec, cfp, calling, cd);
13669 }
13670}
13671static inline VALUE
13672vm_call_method(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd)
13673{
13674 const struct rb_call_info *ci = &cd->ci;
13675 struct rb_call_cache *cc = &cd->cc;
13676 ((void)0);
13677 if (cc->me != ((void *)0)) {
13678 switch ((rb_method_visibility_t)(((cc->me)->flags & (((VALUE)RUBY_FL_USER4) | ((VALUE)RUBY_FL_USER5))) >> ((((VALUE)RUBY_FL_USHIFT) + 4)+0))) {
13679 case METHOD_VISI_PUBLIC:
13680 return vm_call_method_each_type(ec, cfp, calling, cd);
13681 case METHOD_VISI_PRIVATE:
13682 if (!(ci->flag & (0x01 << VM_CALL_FCALL_bit))) {
13683 enum method_missing_reason stat = MISSING_PRIVATE;
13684 if (ci->flag & (0x01 << VM_CALL_VCALL_bit)) stat |= MISSING_VCALL;
13685 cc->aux.method_missing_reason = stat;
13686 CC_SET_FASTPATH(cc, vm_call_method_missing, 1);
13687 return vm_call_method_missing(ec, cfp, calling, cd);
13688 }
13689 return vm_call_method_each_type(ec, cfp, calling, cd);
13690 case METHOD_VISI_PROTECTED:
13691 if (!(ci->flag & (0x01 << VM_CALL_OPT_SEND_bit))) {
13692 if (!rb_obj_is_kind_of(cfp->self, cc->me->defined_class)) {
13693 cc->aux.method_missing_reason = MISSING_PROTECTED;
13694 return vm_call_method_missing(ec, cfp, calling, cd);
13695 }
13696 else {
13697 ((void)0);
13698 if (ci->flag & (0x01 << VM_CALL_KWARG_bit)) {
13699 struct rb_kwarg_call_data *kcd = (void *)cd;
13700 struct rb_kwarg_call_data cd_entry = *kcd;
13701 return vm_call_method_each_type(ec, cfp, calling, (void *)&cd_entry);
13702 }
13703 else {
13704 struct rb_call_data cd_entry = *cd;
13705 return vm_call_method_each_type(ec, cfp, calling, &cd_entry);
13706 }
13707 }
13708 }
13709 return vm_call_method_each_type(ec, cfp, calling, cd);
13710 default:
13711 rb_bug("unreachable");
13712 }
13713 }
13714 else {
13715 return vm_call_method_nome(ec, cfp, calling, cd);
13716 }
13717}
13718static VALUE
13719vm_call_general(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, struct rb_calling_info *calling, struct rb_call_data *cd)
13720{
13721 ((void)0);
13722 return vm_call_method(ec, reg_cfp, calling, cd);
13723}
13724static VALUE
13725vm_call_super_method(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, struct rb_calling_info *calling, struct rb_call_data *cd)
13726{
13727 ((void)0);
13728 const struct rb_call_cache *cc = &cd->cc;
13729 if (cc->call != vm_call_super_method) rb_bug("bug");
13730 return vm_call_method(ec, reg_cfp, calling, cd);
13731}
13732static inline VALUE
13733vm_search_normal_superclass(VALUE klass)
13734{
13735 if ((int)(((struct RBasic*)(klass))->flags & RUBY_T_MASK) == RUBY_T_ICLASS &&
13736 ((!(((VALUE)(((struct RBasic*)(klass))->klass) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(((struct RBasic*)(klass))->klass) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(((struct RBasic*)(klass))->klass))->flags & RUBY_T_MASK) != RUBY_T_NODE)?(((struct RBasic*)((((struct RBasic*)(klass))->klass)))->flags&((RMODULE_IS_REFINEMENT))):0)) {
13737 klass = ((struct RBasic*)(klass))->klass;
13738 }
13739 klass = ((((struct RClass*)(klass))->ptr)->origin_);
13740 return RCLASS_SUPER(klass);
13741}
13742__attribute__ ((__noreturn__)) static void vm_super_outside(void);
13743static void
13744vm_super_outside(void)
13745{
13746 rb_raise(rb_eNoMethodError, "super called outside of method");
13747}
13748static void
13749vm_search_super_method(const rb_control_frame_t *reg_cfp, struct rb_call_data *cd, VALUE recv)
13750{
13751 VALUE current_defined_class, klass;
13752 const rb_callable_method_entry_t *me = rb_vm_frame_method_entry(reg_cfp);
13753 struct rb_call_info *ci = &cd->ci;
13754 struct rb_call_cache *cc = &cd->cc;
13755 if (!me) {
13756 vm_super_outside();
13757 }
13758 current_defined_class = me->defined_class;
13759 if (!!((VALUE)(((((struct RClass*)(current_defined_class))->ptr)->refined_class)) != ((VALUE)RUBY_Qnil))) {
13760 current_defined_class = ((((struct RClass*)(current_defined_class))->ptr)->refined_class);
13761 }
13762 if ((int)(((struct RBasic*)(current_defined_class))->flags & RUBY_T_MASK) != RUBY_T_MODULE &&
13763 !((!(((VALUE)(current_defined_class) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(current_defined_class) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(current_defined_class))->flags & RUBY_T_MASK) != RUBY_T_NODE)?(((struct RBasic*)((current_defined_class)))->flags&((RMODULE_INCLUDED_INTO_REFINEMENT))):0) &&
13764 !rb_obj_is_kind_of(recv, current_defined_class)) {
13765 VALUE m = ( ((RUBY_T_ICLASS) == RUBY_T_FIXNUM) ? (((int)(long)(current_defined_class))&RUBY_FIXNUM_FLAG) : ((RUBY_T_ICLASS) == RUBY_T_TRUE) ? ((current_defined_class) == ((VALUE)RUBY_Qtrue)) : ((RUBY_T_ICLASS) == RUBY_T_FALSE) ? ((current_defined_class) == ((VALUE)RUBY_Qfalse)) : ((RUBY_T_ICLASS) == RUBY_T_NIL) ? ((current_defined_class) == ((VALUE)RUBY_Qnil)) : ((RUBY_T_ICLASS) == RUBY_T_UNDEF) ? ((current_defined_class) == ((VALUE)RUBY_Qundef)) : ((RUBY_T_ICLASS) == RUBY_T_SYMBOL) ? ((((VALUE)(current_defined_class)&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG)||(!(((VALUE)(current_defined_class) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(current_defined_class) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(current_defined_class))->flags & RUBY_T_MASK) == (RUBY_T_SYMBOL))) : ((RUBY_T_ICLASS) == RUBY_T_FLOAT) ? ( ((((int)(long)(current_defined_class))&RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG) || (!(((VALUE)(current_defined_class) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(current_defined_class) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(current_defined_class))->flags & RUBY_T_MASK) == RUBY_T_FLOAT)) : (!(((VALUE)(current_defined_class) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(current_defined_class) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(current_defined_class))->flags & RUBY_T_MASK) == (RUBY_T_ICLASS))) ?
13766 ((((struct RClass*)(current_defined_class))->ptr)->includer) : current_defined_class;
13767 if (m) {
13768 rb_raise(rb_eTypeError,
13769 "self has wrong type to call super in this context: "
13770 "%""l""i" "\v"" (expected %""l""i" "\v"")",
13771 rb_obj_class(recv), m);
13772 }
13773 }
13774 if (me->def->type == VM_METHOD_TYPE_BMETHOD && (ci->flag & (0x01 << VM_CALL_ZSUPER_bit))) {
13775 rb_raise(rb_eRuntimeError,
13776 "implicit argument passing of super from method defined"
13777 " by define_method() is not supported."
13778 " Specify all arguments explicitly.");
13779 }
13780 ci->mid = me->def->original_id;
13781 klass = vm_search_normal_superclass(me->defined_class);
13782 if (!klass) {
13783 cc->aux.method_missing_reason = MISSING_SUPER;
13784 CC_SET_FASTPATH(cc, vm_call_method_missing, 1);
13785 }
13786 else {
13787 CC_SET_ME(cc, rb_callable_method_entry(klass, ci->mid));
13788 CC_SET_FASTPATH(cc, vm_call_super_method, 1);
13789 }
13790}
13791static inline int
13792block_proc_is_lambda(const VALUE procval)
13793{
13794 rb_proc_t *proc;
13795 if (procval) {
13796 (((proc)) = (rb_proc_t*)(((struct RData*)(((procval))))->data));
13797 return proc->is_lambda;
13798 }
13799 else {
13800 return 0;
13801 }
13802}
13803static VALUE
13804vm_yield_with_cfunc(rb_execution_context_t *ec,
13805 const struct rb_captured_block *captured,
13806 VALUE self, int argc, const VALUE *argv, int kw_splat, VALUE block_handler,
13808{
13809 int is_lambda = 0;
13810 VALUE val, arg, blockarg;
13811 int frame_flag;
13812 const struct vm_ifunc *ifunc = captured->code.ifunc;
13813 if (is_lambda) {
13814 arg = rb_ary_new_from_values(argc, argv);
13815 }
13816 else if (argc == 0) {
13817 arg = ((VALUE)RUBY_Qnil);
13818 }
13819 else {
13820 arg = argv[0];
13821 }
13822 blockarg = rb_vm_bh_to_procval(ec, block_handler);
13823 frame_flag = VM_FRAME_MAGIC_IFUNC | VM_FRAME_FLAG_CFRAME | (me ? VM_FRAME_FLAG_BMETHOD : 0);
13824 switch (kw_splat) {
13825 case 1:
13826 frame_flag |= VM_FRAME_FLAG_CFRAME_KW;
13827 break;
13828 case 2:
13829 frame_flag |= VM_FRAME_FLAG_CFRAME_EMPTY_KW;
13830 break;
13831 }
13832 vm_push_frame(ec, (const rb_iseq_t *)captured->code.ifunc,
13833 frame_flag,
13834 self,
13835 ((VALUE)((captured->ep)) | (0x01)),
13836 (VALUE)me,
13837 0, ec->cfp->sp, 0, 0);
13838 val = (*ifunc->func)(arg, (VALUE)ifunc->data, argc, argv, blockarg);
13839 rb_vm_pop_frame(ec);
13840 return val;
13841}
13842static VALUE
13843vm_yield_with_symbol(rb_execution_context_t *ec, VALUE symbol, int argc, const VALUE *argv, int kw_splat, VALUE block_handler)
13844{
13845 return rb_sym_proc_call((rb_sym2id(symbol)), argc, argv, kw_splat, rb_vm_bh_to_procval(ec, block_handler));
13846}
13847static inline int
13848vm_callee_setup_block_arg_arg0_splat(rb_control_frame_t *cfp, const rb_iseq_t *iseq, VALUE *argv, VALUE ary)
13849{
13850 int i;
13851 long len = rb_array_len(ary);
13852 if ((__builtin_expect(!!(!(!(1/!!(sizeof(*((cfp)->sp)) == sizeof(VALUE))) || !(1/!!(sizeof(*(cfp)) == sizeof(rb_control_frame_t))) || ((rb_control_frame_t *)(((cfp)->sp) + (iseq->body->param.lead_num)) + 1) >= (cfp))), 1))) {(void)0;} else vm_stackoverflow();
13853 for (i=0; i<len && i<iseq->body->param.lead_num; i++) {
13854 argv[i] = (rb_array_const_ptr_transient(ary)[i]);
13855 }
13856 return i;
13857}
13858static inline VALUE
13859vm_callee_setup_block_arg_arg0_check(VALUE *argv)
13860{
13861 VALUE ary, arg0 = argv[0];
13862 ary = rb_check_array_type(arg0);
13863 ((void)0);
13864 return ary;
13865}
13866static int
13867vm_callee_setup_block_arg(rb_execution_context_t *ec, struct rb_calling_info *calling, const struct rb_call_info *ci, const rb_iseq_t *iseq, VALUE *argv, const enum arg_setup_type arg_setup_type)
13868{
13869 if (rb_simple_iseq_p(iseq)) {
13870 rb_control_frame_t *cfp = ec->cfp;
13871 VALUE arg0;
13872 CALLER_SETUP_ARG(cfp, calling, ci);
13873 if (calling->kw_splat && calling->argc == iseq->body->param.lead_num + iseq->body->param.post_num && (((!(((struct RBasic*)((cfp->sp[-1])))->flags&(RHASH_ST_TABLE_FLAG))) ? ((unsigned int)((((struct RBasic*)(cfp->sp[-1]))->flags & (VALUE)RHASH_AR_TABLE_SIZE_MASK) >> RHASH_AR_TABLE_SIZE_SHIFT)) : ((((struct RHash*)(cfp->sp[-1]))->as.st)->num_entries)) == 0)) {
13874 rb_warn_keyword_to_last_hash(ec, calling, ci, iseq);
13875 }
13876 else {
13877 CALLER_REMOVE_EMPTY_KW_SPLAT(cfp, calling, ci);
13878 }
13879 if (arg_setup_type == arg_setup_block &&
13880 calling->argc == 1 &&
13881 iseq->body->param.flags.has_lead &&
13882 !iseq->body->param.flags.ambiguous_param0 &&
13883 !!((VALUE)(arg0 = vm_callee_setup_block_arg_arg0_check(argv)) != ((VALUE)RUBY_Qnil))) {
13884 calling->argc = vm_callee_setup_block_arg_arg0_splat(cfp, iseq, argv, arg0);
13885 }
13886 if (calling->argc != iseq->body->param.lead_num) {
13887 if (arg_setup_type == arg_setup_block) {
13888 if (calling->argc < iseq->body->param.lead_num) {
13889 int i;
13890 if ((__builtin_expect(!!(!(!(1/!!(sizeof(*((cfp)->sp)) == sizeof(VALUE))) || !(1/!!(sizeof(*(cfp)) == sizeof(rb_control_frame_t))) || ((rb_control_frame_t *)(((cfp)->sp) + (iseq->body->param.lead_num)) + 1) >= (cfp))), 1))) {(void)0;} else vm_stackoverflow();
13891 for (i=calling->argc; i<iseq->body->param.lead_num; i++) argv[i] = ((VALUE)RUBY_Qnil);
13892 calling->argc = iseq->body->param.lead_num;
13893 }
13894 else if (calling->argc > iseq->body->param.lead_num) {
13895 calling->argc = iseq->body->param.lead_num;
13896 }
13897 }
13898 else {
13899 argument_arity_error(ec, iseq, calling->argc, iseq->body->param.lead_num, iseq->body->param.lead_num);
13900 }
13901 }
13902 return 0;
13903 }
13904 else {
13905 return setup_parameters_complex(ec, iseq, calling, ci, argv, arg_setup_type);
13906 }
13907}
13908static int
13909vm_yield_setup_args(rb_execution_context_t *ec, const rb_iseq_t *iseq, const int argc, VALUE *argv, int kw_splat, VALUE block_handler, enum arg_setup_type arg_setup_type)
13910{
13911 struct rb_calling_info calling_entry, *calling;
13912 struct rb_call_info ci_entry, *ci;
13913 calling = &calling_entry;
13914 calling->argc = argc;
13915 calling->block_handler = block_handler;
13916 calling->kw_splat = kw_splat;
13917 calling->recv = ((VALUE)RUBY_Qundef);
13918 ci_entry.flag = kw_splat ? (0x01 << VM_CALL_KW_SPLAT_bit) : 0;
13919 ci = &ci_entry;
13920 return vm_callee_setup_block_arg(ec, calling, ci, iseq, argv, arg_setup_type);
13921}
13922static VALUE
13923vm_invoke_iseq_block(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp,
13924 struct rb_calling_info *calling, const struct rb_call_info *ci,
13925 int is_lambda, const struct rb_captured_block *captured)
13926{
13927 const rb_iseq_t *iseq = rb_iseq_check(captured->code.iseq);
13928 const int arg_size = iseq->body->param.size;
13929 VALUE * const rsp = ((((reg_cfp)->sp))) - calling->argc;
13930 int opt_pc = vm_callee_setup_block_arg(ec, calling, ci, iseq, rsp, is_lambda ? arg_setup_method : arg_setup_block);
13931 (((reg_cfp)->sp) = (((rsp))));
13932 vm_push_frame(ec, iseq,
13933 VM_FRAME_MAGIC_BLOCK | (is_lambda ? VM_FRAME_FLAG_LAMBDA : 0),
13934 captured->self,
13935 ((VALUE)((captured->ep)) | (0x01)), 0,
13936 iseq->body->iseq_encoded + opt_pc,
13937 rsp + arg_size,
13938 iseq->body->local_table_size - arg_size, iseq->body->stack_max);
13939 return ((VALUE)RUBY_Qundef);
13940}
13941static VALUE
13942vm_invoke_symbol_block(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp,
13943 struct rb_calling_info *calling, const struct rb_call_info *ci,
13944 VALUE symbol)
13945{
13946 VALUE val;
13947 int argc;
13948 CALLER_SETUP_ARG(ec->cfp, calling, ci);
13949 argc = calling->argc;
13950 val = vm_yield_with_symbol(ec, symbol, argc, (((((reg_cfp)->sp)))-(argc)), calling->kw_splat, calling->block_handler);
13951 ((((reg_cfp)->sp) -= (((argc)))));
13952 return val;
13953}
13954static VALUE
13955vm_invoke_ifunc_block(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp,
13956 struct rb_calling_info *calling, const struct rb_call_info *ci,
13957 const struct rb_captured_block *captured)
13958{
13959 VALUE val;
13960 int argc;
13961 int kw_splat = calling->kw_splat;
13962 CALLER_SETUP_ARG(ec->cfp, calling, ci);
13963 CALLER_REMOVE_EMPTY_KW_SPLAT(ec->cfp, calling, ci);
13964 if (kw_splat && !calling->kw_splat) {
13965 kw_splat = 2;
13966 }
13967 else {
13968 kw_splat = calling->kw_splat;
13969 }
13970 argc = calling->argc;
13971 val = vm_yield_with_cfunc(ec, captured, captured->self, argc, (((((reg_cfp)->sp)))-(argc)), kw_splat, calling->block_handler, ((void *)0));
13972 ((((reg_cfp)->sp) -= (((argc)))));
13973 return val;
13974}
13975static VALUE
13976vm_proc_to_block_handler(VALUE procval)
13977{
13978 const struct rb_block *block = vm_proc_block(procval);
13979 switch (vm_block_type(block)) {
13980 case block_type_iseq:
13981 return VM_BH_FROM_ISEQ_BLOCK(&block->as.captured);
13982 case block_type_ifunc:
13983 return VM_BH_FROM_IFUNC_BLOCK(&block->as.captured);
13984 case block_type_symbol:
13985 return VM_BH_FROM_SYMBOL(block->as.symbol);
13986 case block_type_proc:
13987 return VM_BH_FROM_PROC(block->as.proc);
13988 }
13989 __builtin_unreachable();
13990 return ((VALUE)RUBY_Qundef);
13991}
13992static inline VALUE
13993vm_invoke_block(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp,
13994 struct rb_calling_info *calling, const struct rb_call_info *ci, VALUE block_handler)
13995{
13996 int is_lambda = 0;
13997 again:
13998 switch (vm_block_handler_type(block_handler)) {
13999 case block_handler_type_iseq:
14000 {
14001 const struct rb_captured_block *captured = VM_BH_TO_ISEQ_BLOCK(block_handler);
14002 return vm_invoke_iseq_block(ec, reg_cfp, calling, ci, is_lambda, captured);
14003 }
14004 case block_handler_type_ifunc:
14005 {
14006 const struct rb_captured_block *captured = VM_BH_TO_IFUNC_BLOCK(block_handler);
14007 return vm_invoke_ifunc_block(ec, reg_cfp, calling, ci, captured);
14008 }
14009 case block_handler_type_proc:
14010 is_lambda = block_proc_is_lambda(VM_BH_TO_PROC(block_handler));
14011 block_handler = vm_proc_to_block_handler(VM_BH_TO_PROC(block_handler));
14012 goto again;
14013 case block_handler_type_symbol:
14014 return vm_invoke_symbol_block(ec, reg_cfp, calling, ci, VM_BH_TO_SYMBOL(block_handler));
14015 }
14016 __builtin_unreachable();
14017 return ((VALUE)RUBY_Qnil);
14018}
14019static VALUE
14020vm_make_proc_with_iseq(const rb_iseq_t *blockiseq)
14021{
14022 const rb_execution_context_t *ec = rb_current_execution_context();
14023 const rb_control_frame_t *cfp = rb_vm_get_ruby_level_next_cfp(ec, ec->cfp);
14024 struct rb_captured_block *captured;
14025 if (cfp == 0) {
14026 rb_bug("vm_make_proc_with_iseq: unreachable");
14027 }
14028 captured = VM_CFP_TO_CAPTURED_BLOCK(cfp);
14029 captured->code.iseq = blockiseq;
14030 return rb_vm_make_proc(ec, captured, rb_cProc);
14031}
14032static VALUE
14033vm_once_exec(VALUE iseq)
14034{
14035 VALUE proc = vm_make_proc_with_iseq((rb_iseq_t *)iseq);
14036 return rb_proc_call_with_block(proc, 0, 0, ((VALUE)RUBY_Qnil));
14037}
14038static VALUE
14039vm_once_clear(VALUE data)
14040{
14041 union iseq_inline_storage_entry *is = (union iseq_inline_storage_entry *)data;
14042 is->once.running_thread = ((void *)0);
14043 return ((VALUE)RUBY_Qnil);
14044}static inline
14046rb_vm_opt_struct_aref(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp)
14047{
14048 (*(((((reg_cfp)->sp)))-(0)-1)) = rb_struct_aref((((((reg_cfp)))->self)), (*(((((reg_cfp)->sp)))-(0)-1)));
14049 return reg_cfp;
14050}static inline
14052rb_vm_opt_struct_aset(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp)
14053{
14054 rb_struct_aset((((((reg_cfp)))->self)), (*(((((reg_cfp)->sp)))-(0)-1)), (*(((((reg_cfp)->sp)))-(1)-1)));
14055 return reg_cfp;
14056}
14057static enum defined_type
14058check_respond_to_missing(VALUE obj, VALUE v)
14059{
14060 VALUE args[2];
14061 VALUE r;
14062 args[0] = obj; args[1] = ((VALUE)RUBY_Qfalse);
14063 r = rb_check_funcall(v, idRespond_to_missing, 2, args);
14064 if (r != ((VALUE)RUBY_Qundef) && !(((VALUE)(r) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) {
14065 return DEFINED_METHOD;
14066 }
14067 else {
14068 return DEFINED_NOT_DEFINED;
14069 }
14070}
14071static VALUE
14072vm_defined(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, rb_num_t op_type, VALUE obj, VALUE needstr, VALUE v)
14073{
14074 VALUE klass;
14075 enum defined_type expr_type = DEFINED_NOT_DEFINED;
14076 enum defined_type type = (enum defined_type)op_type;
14077 switch (type) {
14078 case DEFINED_IVAR:
14079 if (rb_ivar_defined((((((reg_cfp)))->self)), (rb_sym2id(obj)))) {
14080 expr_type = DEFINED_IVAR;
14081 }
14082 break;
14083 case DEFINED_IVAR2:
14084 klass = vm_get_cbase(((((reg_cfp)->ep))));
14085 break;
14086 case DEFINED_GVAR:
14087 if (rb_gvar_defined(rb_global_entry((rb_sym2id(obj))))) {
14088 expr_type = DEFINED_GVAR;
14089 }
14090 break;
14091 case DEFINED_CVAR: {
14092 const rb_cref_t *cref = vm_get_cref(((((reg_cfp)->ep))));
14093 klass = vm_get_cvar_base(cref, (((reg_cfp))));
14094 if (rb_cvar_defined(klass, (rb_sym2id(obj)))) {
14095 expr_type = DEFINED_CVAR;
14096 }
14097 break;
14098 }
14099 case DEFINED_CONST:
14100 case DEFINED_CONST_FROM: {
14101 _Bool allow_nil = type == DEFINED_CONST;
14102 klass = v;
14103 if (vm_get_ev_const(ec, klass, (rb_sym2id(obj)), allow_nil, 1)) {
14104 expr_type = DEFINED_CONST;
14105 }
14106 break;
14107 }
14108 case DEFINED_FUNC:
14109 klass = rb_class_of((VALUE)(v));
14110 if (rb_method_boundp(klass, (rb_sym2id(obj)), 0)) {
14111 expr_type = DEFINED_METHOD;
14112 }
14113 else {
14114 expr_type = check_respond_to_missing(obj, v);
14115 }
14116 break;
14117 case DEFINED_METHOD:{
14118 VALUE klass = rb_class_of((VALUE)(v));
14119 const rb_method_entry_t *me = rb_method_entry(klass, (rb_sym2id(obj)));
14120 if (me) {
14121 switch ((rb_method_visibility_t)(((me)->flags & (((VALUE)RUBY_FL_USER4) | ((VALUE)RUBY_FL_USER5))) >> ((((VALUE)RUBY_FL_USHIFT) + 4)+0))) {
14122 case METHOD_VISI_PRIVATE:
14123 break;
14124 case METHOD_VISI_PROTECTED:
14125 if (!rb_obj_is_kind_of((((((reg_cfp)))->self)), rb_class_real(klass))) {
14126 break;
14127 }
14128 case METHOD_VISI_PUBLIC:
14129 expr_type = DEFINED_METHOD;
14130 break;
14131 default:
14132 rb_bug("vm_defined: unreachable: %u", (unsigned int)(rb_method_visibility_t)(((me)->flags & (((VALUE)RUBY_FL_USER4) | ((VALUE)RUBY_FL_USER5))) >> ((((VALUE)RUBY_FL_USHIFT) + 4)+0)));
14133 }
14134 }
14135 else {
14136 expr_type = check_respond_to_missing(obj, v);
14137 }
14138 break;
14139 }
14140 case DEFINED_YIELD:
14141 if (((VM_EP_LEP(((((reg_cfp)->ep)))))[(-1)]) != 0) {
14142 expr_type = DEFINED_YIELD;
14143 }
14144 break;
14145 case DEFINED_ZSUPER:
14146 {
14147 const rb_callable_method_entry_t *me = rb_vm_frame_method_entry((((reg_cfp))));
14148 if (me) {
14149 VALUE klass = vm_search_normal_superclass(me->defined_class);
14150 ID id = me->def->original_id;
14151 if (rb_method_boundp(klass, id, 0)) {
14152 expr_type = DEFINED_ZSUPER;
14153 }
14154 }
14155 }
14156 break;
14157 case DEFINED_REF:{
14158 if (vm_getspecial(ec, (VM_EP_LEP(((((reg_cfp)->ep))))), ((VALUE)RUBY_Qfalse), ((int)rb_fix2int((VALUE)(obj)))) != ((VALUE)RUBY_Qnil)) {
14159 expr_type = DEFINED_GVAR;
14160 }
14161 break;
14162 }
14163 default:
14164 rb_bug("unimplemented defined? type (VM)");
14165 break;
14166 }
14167 if (expr_type != 0) {
14168 if (needstr != ((VALUE)RUBY_Qfalse)) {
14169 return rb_iseq_defined_string(expr_type);
14170 }
14171 else {
14172 return ((VALUE)RUBY_Qtrue);
14173 }
14174 }
14175 else {
14176 return ((VALUE)RUBY_Qnil);
14177 }
14178}
14179static const VALUE *
14180vm_get_ep(const VALUE *const reg_ep, rb_num_t lv)
14181{
14182 rb_num_t i;
14183 const VALUE *ep = reg_ep;
14184 for (i = 0; i < lv; i++) {
14185 ep = ((VALUE *)((ep)[(-1)] & ~0x03));
14186 }
14187 return ep;
14188}
14189static VALUE
14190vm_get_special_object(const VALUE *const reg_ep,
14191 enum vm_special_object_type type)
14192{
14193 switch (type) {
14194 case VM_SPECIAL_OBJECT_VMCORE:
14195 return rb_mRubyVMFrozenCore;
14196 case VM_SPECIAL_OBJECT_CBASE:
14197 return vm_get_cbase(reg_ep);
14198 case VM_SPECIAL_OBJECT_CONST_BASE:
14199 return vm_get_const_base(reg_ep);
14200 default:
14201 rb_bug("putspecialobject insn: unknown value_type %d", type);
14202 }
14203}
14204static void
14205vm_freezestring(VALUE str, VALUE debug)
14206{
14207 if (!!((VALUE)(debug) != ((VALUE)RUBY_Qnil))) {
14208 rb_ivar_set(str, id_debug_created_info, debug);
14209 }
14210 rb_str_freeze(str);
14211}
14212static VALUE
14213vm_concat_array(VALUE ary1, VALUE ary2st)
14214{
14215 const VALUE ary2 = ary2st;
14216 VALUE tmp1 = rb_check_to_array(ary1);
14217 VALUE tmp2 = rb_check_to_array(ary2);
14218 if (!((VALUE)(tmp1) != ((VALUE)RUBY_Qnil))) {
14219 tmp1 = __extension__ ({ const VALUE args_to_new_ary[] = {ary1}; if (__builtin_constant_p(1)) { __extension__ _Static_assert(((int)(sizeof(args_to_new_ary) / sizeof((args_to_new_ary)[0]))) == (1), "rb_ary_new_from_args" ": " "numberof(args_to_new_ary) == (1)"); } rb_ary_new_from_values(((int)(sizeof(args_to_new_ary) / sizeof((args_to_new_ary)[0]))), args_to_new_ary); });
14220 }
14221 if (!((VALUE)(tmp2) != ((VALUE)RUBY_Qnil))) {
14222 tmp2 = __extension__ ({ const VALUE args_to_new_ary[] = {ary2}; if (__builtin_constant_p(1)) { __extension__ _Static_assert(((int)(sizeof(args_to_new_ary) / sizeof((args_to_new_ary)[0]))) == (1), "rb_ary_new_from_args" ": " "numberof(args_to_new_ary) == (1)"); } rb_ary_new_from_values(((int)(sizeof(args_to_new_ary) / sizeof((args_to_new_ary)[0]))), args_to_new_ary); });
14223 }
14224 if (tmp1 == ary1) {
14225 tmp1 = rb_ary_dup(ary1);
14226 }
14227 return rb_ary_concat(tmp1, tmp2);
14228}
14229static VALUE
14230vm_splat_array(VALUE flag, VALUE ary)
14231{
14232 VALUE tmp = rb_check_to_array(ary);
14233 if (!((VALUE)(tmp) != ((VALUE)RUBY_Qnil))) {
14234 return __extension__ ({ const VALUE args_to_new_ary[] = {ary}; if (__builtin_constant_p(1)) { __extension__ _Static_assert(((int)(sizeof(args_to_new_ary) / sizeof((args_to_new_ary)[0]))) == (1), "rb_ary_new_from_args" ": " "numberof(args_to_new_ary) == (1)"); } rb_ary_new_from_values(((int)(sizeof(args_to_new_ary) / sizeof((args_to_new_ary)[0]))), args_to_new_ary); });
14235 }
14236 else if (!(((VALUE)(flag) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) {
14237 return rb_ary_dup(tmp);
14238 }
14239 else {
14240 return tmp;
14241 }
14242}
14243static VALUE
14244vm_check_match(rb_execution_context_t *ec, VALUE target, VALUE pattern, rb_num_t flag)
14245{
14246 enum vm_check_match_type type = ((int)flag) & 0x03;
14247 if (flag & 0x04) {
14248 long i;
14249 const long n = rb_array_len(pattern);
14250 for (i = 0; i < n; i++) {
14251 VALUE v = (rb_array_const_ptr_transient(pattern)[i]);
14252 VALUE c = check_match(ec, v, target, type);
14253 if (!(((VALUE)(c) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) {
14254 return c;
14255 }
14256 }
14257 return ((VALUE)RUBY_Qfalse);
14258 }
14259 else {
14260 return check_match(ec, pattern, target, type);
14261 }
14262}
14263static VALUE
14264vm_check_keyword(lindex_t bits, lindex_t idx, const VALUE *ep)
14265{
14266 const VALUE kw_bits = *(ep - bits);
14267 if ((((int)(long)(kw_bits))&RUBY_FIXNUM_FLAG)) {
14268 unsigned int b = (unsigned int)((unsigned long)((long)(((long)(kw_bits))>>(int)(1))));
14269 if ((idx < (32-1)) && (b & (0x01 << idx)))
14270 return ((VALUE)RUBY_Qfalse);
14271 }
14272 else {
14273 ((void)0);
14274 if (rb_hash_has_key(kw_bits, (((VALUE)(idx))<<1 | RUBY_FIXNUM_FLAG))) return ((VALUE)RUBY_Qfalse);
14275 }
14276 return ((VALUE)RUBY_Qtrue);
14277}
14278static void
14279vm_dtrace(rb_event_flag_t flag, rb_execution_context_t *ec)
14280{
14281 if (0 ||
14282 0 ||
14283 0 ||
14284 0) {
14285 switch (flag) {
14286 case 0x0008:
14287 do { if ((__builtin_expect(!!(0), 0))) { struct ruby_dtrace_method_hook_args args; if (rb_dtrace_setup(ec, 0, 0, &args)) { do {} while (0); } } } while (0);
14288 return;
14289 case 0x0020:
14290 do { if ((__builtin_expect(!!(0), 0))) { struct ruby_dtrace_method_hook_args args; if (rb_dtrace_setup(ec, 0, 0, &args)) { do {} while (0); } } } while (0);
14291 return;
14292 case 0x0010:
14293 do { if ((__builtin_expect(!!(0), 0))) { struct ruby_dtrace_method_hook_args args; if (rb_dtrace_setup(ec, 0, 0, &args)) { do {} while (0); } } } while (0);
14294 return;
14295 case 0x0040:
14296 do { if ((__builtin_expect(!!(0), 0))) { struct ruby_dtrace_method_hook_args args; if (rb_dtrace_setup(ec, 0, 0, &args)) { do {} while (0); } } } while (0);
14297 return;
14298 }
14299 }
14300}
14301static VALUE
14302vm_const_get_under(ID id, rb_num_t flags, VALUE cbase)
14303{
14304 VALUE ns;
14305 if ((ns = vm_search_const_defined_class(cbase, id)) == 0) {
14306 return ns;
14307 }
14308 else if (((flags) & 0x08)) {
14309 return rb_public_const_get_at(ns, id);
14310 }
14311 else {
14312 return rb_const_get_at(ns, id);
14313 }
14314}
14315static VALUE
14316vm_check_if_class(ID id, rb_num_t flags, VALUE super, VALUE klass)
14317{
14318 if (!( ((RUBY_T_CLASS) == RUBY_T_FIXNUM) ? (((int)(long)(klass))&RUBY_FIXNUM_FLAG) : ((RUBY_T_CLASS) == RUBY_T_TRUE) ? ((klass) == ((VALUE)RUBY_Qtrue)) : ((RUBY_T_CLASS) == RUBY_T_FALSE) ? ((klass) == ((VALUE)RUBY_Qfalse)) : ((RUBY_T_CLASS) == RUBY_T_NIL) ? ((klass) == ((VALUE)RUBY_Qnil)) : ((RUBY_T_CLASS) == RUBY_T_UNDEF) ? ((klass) == ((VALUE)RUBY_Qundef)) : ((RUBY_T_CLASS) == RUBY_T_SYMBOL) ? ((((VALUE)(klass)&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG)||(!(((VALUE)(klass) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(klass) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(klass))->flags & RUBY_T_MASK) == (RUBY_T_SYMBOL))) : ((RUBY_T_CLASS) == RUBY_T_FLOAT) ? ( ((((int)(long)(klass))&RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG) || (!(((VALUE)(klass) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(klass) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(klass))->flags & RUBY_T_MASK) == RUBY_T_FLOAT)) : (!(((VALUE)(klass) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(klass) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(klass))->flags & RUBY_T_MASK) == (RUBY_T_CLASS)))) {
14319 return 0;
14320 }
14321 else if (((flags) & 0x10)) {
14322 VALUE tmp = rb_class_real(RCLASS_SUPER(klass));
14323 if (tmp != super) {
14324 rb_raise(rb_eTypeError,
14325 "superclass mismatch for class %""l""i" "\v""",
14326 rb_id2str(id));
14327 }
14328 else {
14329 return klass;
14330 }
14331 }
14332 else {
14333 return klass;
14334 }
14335}
14336static VALUE
14337vm_check_if_module(ID id, VALUE mod)
14338{
14339 if (!( ((RUBY_T_MODULE) == RUBY_T_FIXNUM) ? (((int)(long)(mod))&RUBY_FIXNUM_FLAG) : ((RUBY_T_MODULE) == RUBY_T_TRUE) ? ((mod) == ((VALUE)RUBY_Qtrue)) : ((RUBY_T_MODULE) == RUBY_T_FALSE) ? ((mod) == ((VALUE)RUBY_Qfalse)) : ((RUBY_T_MODULE) == RUBY_T_NIL) ? ((mod) == ((VALUE)RUBY_Qnil)) : ((RUBY_T_MODULE) == RUBY_T_UNDEF) ? ((mod) == ((VALUE)RUBY_Qundef)) : ((RUBY_T_MODULE) == RUBY_T_SYMBOL) ? ((((VALUE)(mod)&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG)||(!(((VALUE)(mod) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(mod) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(mod))->flags & RUBY_T_MASK) == (RUBY_T_SYMBOL))) : ((RUBY_T_MODULE) == RUBY_T_FLOAT) ? ( ((((int)(long)(mod))&RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG) || (!(((VALUE)(mod) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(mod) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(mod))->flags & RUBY_T_MASK) == RUBY_T_FLOAT)) : (!(((VALUE)(mod) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(mod) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(mod))->flags & RUBY_T_MASK) == (RUBY_T_MODULE)))) {
14340 return 0;
14341 }
14342 else {
14343 return mod;
14344 }
14345}
14346static VALUE
14347declare_under(ID id, VALUE cbase, VALUE c)
14348{
14349 rb_set_class_path_string(c, cbase, rb_id2str(id));
14350 rb_const_set(cbase, id, c);
14351 return c;
14352}
14353static VALUE
14354vm_declare_class(ID id, rb_num_t flags, VALUE cbase, VALUE super)
14355{
14356 VALUE s = ((flags) & 0x10) ? super : rb_cObject;
14357 VALUE c = declare_under(id, cbase, rb_define_class_id(id, s));
14358 rb_class_inherited(s, c);
14359 return c;
14360}
14361static VALUE
14362vm_declare_module(ID id, VALUE cbase)
14363{
14364 return declare_under(id, cbase, rb_define_module_id(id));
14365}
14366__attribute__ ((__noreturn__)) static void unmatched_redefinition(const char *type, VALUE cbase, ID id, VALUE old);
14367static void
14368unmatched_redefinition(const char *type, VALUE cbase, ID id, VALUE old)
14369{
14370 VALUE name = rb_id2str(id);
14371 VALUE message = rb_sprintf("%""l""i" "\v"" is not a %s",
14372 name, type);
14373 VALUE location = rb_const_source_location_at(cbase, id);
14374 if (!!((VALUE)(location) != ((VALUE)RUBY_Qnil))) {
14375 rb_str_catf(message, "\n%""l""i" "\v"":%""l""i" "\v"":"
14376 " previous definition of %""l""i" "\v"" was here",
14377 rb_ary_entry(location, 0), rb_ary_entry(location, 1), name);
14378 }
14379 rb_exc_raise(rb_exc_new_str(rb_eTypeError, message));
14380}
14381static VALUE
14382vm_define_class(ID id, rb_num_t flags, VALUE cbase, VALUE super)
14383{
14384 VALUE klass;
14385 if (((flags) & 0x10) && !( ((RUBY_T_CLASS) == RUBY_T_FIXNUM) ? (((int)(long)(super))&RUBY_FIXNUM_FLAG) : ((RUBY_T_CLASS) == RUBY_T_TRUE) ? ((super) == ((VALUE)RUBY_Qtrue)) : ((RUBY_T_CLASS) == RUBY_T_FALSE) ? ((super) == ((VALUE)RUBY_Qfalse)) : ((RUBY_T_CLASS) == RUBY_T_NIL) ? ((super) == ((VALUE)RUBY_Qnil)) : ((RUBY_T_CLASS) == RUBY_T_UNDEF) ? ((super) == ((VALUE)RUBY_Qundef)) : ((RUBY_T_CLASS) == RUBY_T_SYMBOL) ? ((((VALUE)(super)&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG)||(!(((VALUE)(super) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(super) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(super))->flags & RUBY_T_MASK) == (RUBY_T_SYMBOL))) : ((RUBY_T_CLASS) == RUBY_T_FLOAT) ? ( ((((int)(long)(super))&RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG) || (!(((VALUE)(super) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(super) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(super))->flags & RUBY_T_MASK) == RUBY_T_FLOAT)) : (!(((VALUE)(super) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(super) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(super))->flags & RUBY_T_MASK) == (RUBY_T_CLASS)))) {
14386 rb_raise(rb_eTypeError,
14387 "superclass must be a Class (%""l""i" "\v"" given)",
14388 rb_obj_class(super));
14389 }
14390 vm_check_if_namespace(cbase);
14391 rb_autoload_load(cbase, id);
14392 if ((klass = vm_const_get_under(id, flags, cbase)) != 0) {
14393 if (!vm_check_if_class(id, flags, super, klass))
14394 unmatched_redefinition("class", cbase, id, klass);
14395 return klass;
14396 }
14397 else {
14398 return vm_declare_class(id, flags, cbase, super);
14399 }
14400}
14401static VALUE
14402vm_define_module(ID id, rb_num_t flags, VALUE cbase)
14403{
14404 VALUE mod;
14405 vm_check_if_namespace(cbase);
14406 if ((mod = vm_const_get_under(id, flags, cbase)) != 0) {
14407 if (!vm_check_if_module(id, mod))
14408 unmatched_redefinition("module", cbase, id, mod);
14409 return mod;
14410 }
14411 else {
14412 return vm_declare_module(id, cbase);
14413 }
14414}
14415static VALUE
14416vm_find_or_create_class_by_id(ID id,
14417 rb_num_t flags,
14418 VALUE cbase,
14419 VALUE super)
14420{
14421 rb_vm_defineclass_type_t type = ((rb_vm_defineclass_type_t)(flags) & VM_DEFINECLASS_TYPE_MASK);
14422 switch (type) {
14423 case VM_DEFINECLASS_TYPE_CLASS:
14424 return vm_define_class(id, flags, cbase, super);
14425 case VM_DEFINECLASS_TYPE_SINGLETON_CLASS:
14426 return rb_singleton_class(cbase);
14427 case VM_DEFINECLASS_TYPE_MODULE:
14428 return vm_define_module(id, flags, cbase);
14429 default:
14430 rb_bug("unknown defineclass type: %d", (int)type);
14431 }
14432}
14433static rb_method_visibility_t
14434vm_scope_visibility_get(const rb_execution_context_t *ec)
14435{
14436 const rb_control_frame_t *cfp = rb_vm_get_ruby_level_next_cfp(ec, ec->cfp);
14437 if (!vm_env_cref_by_cref(cfp->ep)) {
14438 return METHOD_VISI_PUBLIC;
14439 }
14440 else {
14441 return CREF_SCOPE_VISI(vm_ec_cref(ec))->method_visi;
14442 }
14443}
14444static int
14445vm_scope_module_func_check(const rb_execution_context_t *ec)
14446{
14447 const rb_control_frame_t *cfp = rb_vm_get_ruby_level_next_cfp(ec, ec->cfp);
14448 if (!vm_env_cref_by_cref(cfp->ep)) {
14449 return 0;
14450 }
14451 else {
14452 return CREF_SCOPE_VISI(vm_ec_cref(ec))->module_func;
14453 }
14454}
14455static void
14456vm_define_method(const rb_execution_context_t *ec, VALUE obj, ID id, VALUE iseqval, int is_singleton)
14457{
14458 VALUE klass;
14459 rb_method_visibility_t visi;
14460 rb_cref_t *cref = vm_ec_cref(ec);
14461 if (!is_singleton) {
14462 klass = CREF_CLASS(cref);
14463 visi = vm_scope_visibility_get(ec);
14464 }
14465 else {
14466 klass = rb_singleton_class(obj);
14467 visi = METHOD_VISI_PUBLIC;
14468 }
14469 if (!((VALUE)(klass) != ((VALUE)RUBY_Qnil))) {
14470 rb_raise(rb_eTypeError, "no class/module to add method");
14471 }
14472 rb_add_method_iseq(klass, id, (const rb_iseq_t *)iseqval, cref, visi);
14473 if (!is_singleton && vm_scope_module_func_check(ec)) {
14474 klass = rb_singleton_class(klass);
14475 rb_add_method_iseq(klass, id, (const rb_iseq_t *)iseqval, cref, METHOD_VISI_PUBLIC);
14476 }
14477}
14478static void
14479vm_search_method_wrap(
14480 const struct rb_control_frame_struct *reg_cfp,
14481 struct rb_call_data *cd,
14482 VALUE recv)
14483{
14484 vm_search_method(cd, recv);
14485}
14486static void
14487vm_search_invokeblock(
14488 const struct rb_control_frame_struct *reg_cfp,
14489 struct rb_call_data *cd,
14490 VALUE recv)
14491{
14492}
14493static VALUE
14494vm_invokeblock_i(
14495 struct rb_execution_context_struct *ec,
14496 struct rb_control_frame_struct *reg_cfp,
14497 struct rb_calling_info *calling,
14498 struct rb_call_data *cd)
14499{
14500 const struct rb_call_info *ci = &cd->ci;
14501 VALUE block_handler = VM_CF_BLOCK_HANDLER((((reg_cfp))));
14502 if (block_handler == 0) {
14503 rb_vm_localjump_error("no block given (yield)", ((VALUE)RUBY_Qnil), 0);
14504 }
14505 else {
14506 return vm_invoke_block(ec, (((reg_cfp))), calling, ci, block_handler);
14507 }
14508}
14509static VALUE
14510vm_sendish(
14511 struct rb_execution_context_struct *ec,
14512 struct rb_control_frame_struct *reg_cfp,
14513 struct rb_call_data *cd,
14514 VALUE block_handler,
14515 void (*method_explorer)(
14516 const struct rb_control_frame_struct *reg_cfp,
14517 struct rb_call_data *cd,
14518 VALUE recv))
14519{
14520 CALL_INFO ci = &cd->ci;
14521 CALL_CACHE cc = &cd->cc;
14522 VALUE val;
14523 int argc = ci->orig_argc;
14524 VALUE recv = (*(((((reg_cfp)->sp)))-(argc)-1));
14525 struct rb_calling_info calling;
14526 calling.block_handler = block_handler;
14527 calling.kw_splat = ((ci)->flag & (0x01 << VM_CALL_KW_SPLAT_bit)) > 0;
14528 calling.recv = recv;
14529 calling.argc = argc;
14530 method_explorer((((reg_cfp))), cd, recv);
14531 val = cc->call(ec, (((reg_cfp))), &calling, cd);
14532 if (val != ((VALUE)RUBY_Qundef)) {
14533 return val;
14534 }
14535 else {
14536 do { (reg_cfp) = ec->cfp; } while (0);
14537 }
14538 if (((((reg_cfp)))->iseq)->body->catch_except_p) {
14539 VM_ENV_FLAGS_SET(((((reg_cfp)->ep))), VM_FRAME_FLAG_FINISH);
14540 return rb_vm_exec(ec, 1);
14541 }
14542 else if ((val = mjit_exec(ec)) == ((VALUE)RUBY_Qundef)) {
14543 VM_ENV_FLAGS_SET(((((reg_cfp)->ep))), VM_FRAME_FLAG_FINISH);
14544 return rb_vm_exec(ec, 0);
14545 }
14546 else {
14547 return val;
14548 }
14549}
14550static VALUE
14551vm_opt_str_freeze(VALUE str, int bop, ID id)
14552{
14553 if (((__builtin_expect(!!((rb_current_vm()->redefined_flag[(bop)]&((1 << 2))) == 0), 1)))) {
14554 return str;
14555 }
14556 else {
14557 return ((VALUE)RUBY_Qundef);
14558 }
14559}
14560static VALUE
14561vm_opt_newarray_max(rb_num_t num, const VALUE *ptr)
14562{
14563 if (((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_MAX)]&((1 << 3))) == 0), 1)))) {
14564 if (num == 0) {
14565 return ((VALUE)RUBY_Qnil);
14566 }
14567 else {
14568 struct cmp_opt_data cmp_opt = { 0, 0 };
14569 VALUE result = *ptr;
14570 rb_snum_t i = num - 1;
14571 while (i-- > 0) {
14572 const VALUE v = *++ptr;
14573 if ((((((int)(long)(v))&RUBY_FIXNUM_FLAG) && (((int)(long)(result))&RUBY_FIXNUM_FLAG) && (((cmp_opt).opt_inited & (1U << cmp_opt_Fixnum)) ? ((cmp_opt).opt_methods & (1U << cmp_opt_Fixnum)) : (((cmp_opt).opt_inited |= (1U << cmp_opt_Fixnum)), __extension__({ static struct rb_call_data rb_mbdp; (rb_cInteger == ((VALUE)RUBY_Qfalse)) ? 1 : rb_method_basic_definition_p_with_cc(&rb_mbdp, rb_cInteger, idCmp); }) && ((cmp_opt).opt_methods |= (1U << cmp_opt_Fixnum))))) ? (((long)v > (long)result) ? 1 : ((long)v < (long)result) ? -1 : 0) : ((( ((RUBY_T_STRING) == RUBY_T_FIXNUM) ? (((int)(long)((v)))&RUBY_FIXNUM_FLAG) : ((RUBY_T_STRING) == RUBY_T_TRUE) ? (((v)) == ((VALUE)RUBY_Qtrue)) : ((RUBY_T_STRING) == RUBY_T_FALSE) ? (((v)) == ((VALUE)RUBY_Qfalse)) : ((RUBY_T_STRING) == RUBY_T_NIL) ? (((v)) == ((VALUE)RUBY_Qnil)) : ((RUBY_T_STRING) == RUBY_T_UNDEF) ? (((v)) == ((VALUE)RUBY_Qundef)) : ((RUBY_T_STRING) == RUBY_T_SYMBOL) ? ((((VALUE)((v))&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG)||(!(((VALUE)((v)) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)((v)) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)((v)))->flags & RUBY_T_MASK) == (RUBY_T_SYMBOL))) : ((RUBY_T_STRING) == RUBY_T_FLOAT) ? ( ((((int)(long)((v)))&RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG) || (!(((VALUE)((v)) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)((v)) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)((v)))->flags & RUBY_T_MASK) == RUBY_T_FLOAT)) : (!(((VALUE)((v)) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)((v)) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)((v)))->flags & RUBY_T_MASK) == (RUBY_T_STRING))) && rb_class_of((VALUE)(v)) == rb_cString) && (( ((RUBY_T_STRING) == RUBY_T_FIXNUM) ? (((int)(long)((result)))&RUBY_FIXNUM_FLAG) : ((RUBY_T_STRING) == RUBY_T_TRUE) ? (((result)) == ((VALUE)RUBY_Qtrue)) : ((RUBY_T_STRING) == RUBY_T_FALSE) ? (((result)) == ((VALUE)RUBY_Qfalse)) : ((RUBY_T_STRING) == RUBY_T_NIL) ? (((result)) == ((VALUE)RUBY_Qnil)) : ((RUBY_T_STRING) == RUBY_T_UNDEF) ? (((result)) == ((VALUE)RUBY_Qundef)) : ((RUBY_T_STRING) == RUBY_T_SYMBOL) ? ((((VALUE)((result))&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG)||(!(((VALUE)((result)) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)((result)) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)((result)))->flags & RUBY_T_MASK) == (RUBY_T_SYMBOL))) : ((RUBY_T_STRING) == RUBY_T_FLOAT) ? ( ((((int)(long)((result)))&RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG) || (!(((VALUE)((result)) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)((result)) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)((result)))->flags & RUBY_T_MASK) == RUBY_T_FLOAT)) : (!(((VALUE)((result)) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)((result)) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)((result)))->flags & RUBY_T_MASK) == (RUBY_T_STRING))) && rb_class_of((VALUE)(result)) == rb_cString) && (((cmp_opt).opt_inited & (1U << cmp_opt_String)) ? ((cmp_opt).opt_methods & (1U << cmp_opt_String)) : (((cmp_opt).opt_inited |= (1U << cmp_opt_String)), __extension__({ static struct rb_call_data rb_mbdp; (rb_cString == ((VALUE)RUBY_Qfalse)) ? 1 : rb_method_basic_definition_p_with_cc(&rb_mbdp, rb_cString, idCmp); }) && ((cmp_opt).opt_methods |= (1U << cmp_opt_String))))) ? rb_str_cmp(v, result) : (( ((((int)(long)(v))&RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG) || (!(((VALUE)(v) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(v) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(v))->flags & RUBY_T_MASK) == RUBY_T_FLOAT)) && ( ((((int)(long)(result))&RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG) || (!(((VALUE)(result) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(result) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(result))->flags & RUBY_T_MASK) == RUBY_T_FLOAT)) && (((cmp_opt).opt_inited & (1U << cmp_opt_Float)) ? ((cmp_opt).opt_methods & (1U << cmp_opt_Float)) : (((cmp_opt).opt_inited |= (1U << cmp_opt_Float)), __extension__({ static struct rb_call_data rb_mbdp; (rb_cFloat == ((VALUE)RUBY_Qfalse)) ? 1 : rb_method_basic_definition_p_with_cc(&rb_mbdp, rb_cFloat, idCmp); }) && ((cmp_opt).opt_methods |= (1U << cmp_opt_Float))))) ? rb_float_cmp(v, result) : rb_cmpint(__extension__({ static struct rb_call_data rb_funcallv_data; rb_funcallv_with_cc(&rb_funcallv_data, v, idCmp, 1, &result); }), v, result)) > 0) {
14574 result = v;
14575 }
14576 }
14577 return result;
14578 }
14579 }
14580 else {
14581 VALUE ary = rb_ary_new_from_values(num, ptr);
14582 return __extension__({ const int rb_funcall_argc = (0); const VALUE rb_funcall_args[] = {}; const int rb_funcall_nargs = (int)(sizeof(rb_funcall_args) / sizeof(VALUE)); __extension__({ static struct rb_call_data rb_funcallv_data; rb_funcallv_with_cc(&rb_funcallv_data, ary, idMax, __builtin_choose_expr(__builtin_constant_p(rb_funcall_argc), (((rb_funcall_argc) == 0 ? (rb_funcall_nargs) <= 1 : (rb_funcall_argc) == (rb_funcall_nargs)) ? (rb_funcall_argc) : rb_varargs_bad_length(rb_funcall_argc, rb_funcall_nargs)), (((rb_funcall_argc) <= (rb_funcall_nargs)) ? (rb_funcall_argc) : (rb_fatal("argc(%d) exceeds actual arguments(%d)", rb_funcall_argc, rb_funcall_nargs), 0))), rb_funcall_nargs ? rb_funcall_args : ((void *)0)); }); });
14583 }
14584}
14585static VALUE
14586vm_opt_newarray_min(rb_num_t num, const VALUE *ptr)
14587{
14588 if (((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_MIN)]&((1 << 3))) == 0), 1)))) {
14589 if (num == 0) {
14590 return ((VALUE)RUBY_Qnil);
14591 }
14592 else {
14593 struct cmp_opt_data cmp_opt = { 0, 0 };
14594 VALUE result = *ptr;
14595 rb_snum_t i = num - 1;
14596 while (i-- > 0) {
14597 const VALUE v = *++ptr;
14598 if ((((((int)(long)(v))&RUBY_FIXNUM_FLAG) && (((int)(long)(result))&RUBY_FIXNUM_FLAG) && (((cmp_opt).opt_inited & (1U << cmp_opt_Fixnum)) ? ((cmp_opt).opt_methods & (1U << cmp_opt_Fixnum)) : (((cmp_opt).opt_inited |= (1U << cmp_opt_Fixnum)), __extension__({ static struct rb_call_data rb_mbdp; (rb_cInteger == ((VALUE)RUBY_Qfalse)) ? 1 : rb_method_basic_definition_p_with_cc(&rb_mbdp, rb_cInteger, idCmp); }) && ((cmp_opt).opt_methods |= (1U << cmp_opt_Fixnum))))) ? (((long)v > (long)result) ? 1 : ((long)v < (long)result) ? -1 : 0) : ((( ((RUBY_T_STRING) == RUBY_T_FIXNUM) ? (((int)(long)((v)))&RUBY_FIXNUM_FLAG) : ((RUBY_T_STRING) == RUBY_T_TRUE) ? (((v)) == ((VALUE)RUBY_Qtrue)) : ((RUBY_T_STRING) == RUBY_T_FALSE) ? (((v)) == ((VALUE)RUBY_Qfalse)) : ((RUBY_T_STRING) == RUBY_T_NIL) ? (((v)) == ((VALUE)RUBY_Qnil)) : ((RUBY_T_STRING) == RUBY_T_UNDEF) ? (((v)) == ((VALUE)RUBY_Qundef)) : ((RUBY_T_STRING) == RUBY_T_SYMBOL) ? ((((VALUE)((v))&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG)||(!(((VALUE)((v)) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)((v)) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)((v)))->flags & RUBY_T_MASK) == (RUBY_T_SYMBOL))) : ((RUBY_T_STRING) == RUBY_T_FLOAT) ? ( ((((int)(long)((v)))&RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG) || (!(((VALUE)((v)) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)((v)) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)((v)))->flags & RUBY_T_MASK) == RUBY_T_FLOAT)) : (!(((VALUE)((v)) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)((v)) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)((v)))->flags & RUBY_T_MASK) == (RUBY_T_STRING))) && rb_class_of((VALUE)(v)) == rb_cString) && (( ((RUBY_T_STRING) == RUBY_T_FIXNUM) ? (((int)(long)((result)))&RUBY_FIXNUM_FLAG) : ((RUBY_T_STRING) == RUBY_T_TRUE) ? (((result)) == ((VALUE)RUBY_Qtrue)) : ((RUBY_T_STRING) == RUBY_T_FALSE) ? (((result)) == ((VALUE)RUBY_Qfalse)) : ((RUBY_T_STRING) == RUBY_T_NIL) ? (((result)) == ((VALUE)RUBY_Qnil)) : ((RUBY_T_STRING) == RUBY_T_UNDEF) ? (((result)) == ((VALUE)RUBY_Qundef)) : ((RUBY_T_STRING) == RUBY_T_SYMBOL) ? ((((VALUE)((result))&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG)||(!(((VALUE)((result)) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)((result)) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)((result)))->flags & RUBY_T_MASK) == (RUBY_T_SYMBOL))) : ((RUBY_T_STRING) == RUBY_T_FLOAT) ? ( ((((int)(long)((result)))&RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG) || (!(((VALUE)((result)) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)((result)) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)((result)))->flags & RUBY_T_MASK) == RUBY_T_FLOAT)) : (!(((VALUE)((result)) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)((result)) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)((result)))->flags & RUBY_T_MASK) == (RUBY_T_STRING))) && rb_class_of((VALUE)(result)) == rb_cString) && (((cmp_opt).opt_inited & (1U << cmp_opt_String)) ? ((cmp_opt).opt_methods & (1U << cmp_opt_String)) : (((cmp_opt).opt_inited |= (1U << cmp_opt_String)), __extension__({ static struct rb_call_data rb_mbdp; (rb_cString == ((VALUE)RUBY_Qfalse)) ? 1 : rb_method_basic_definition_p_with_cc(&rb_mbdp, rb_cString, idCmp); }) && ((cmp_opt).opt_methods |= (1U << cmp_opt_String))))) ? rb_str_cmp(v, result) : (( ((((int)(long)(v))&RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG) || (!(((VALUE)(v) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(v) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(v))->flags & RUBY_T_MASK) == RUBY_T_FLOAT)) && ( ((((int)(long)(result))&RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG) || (!(((VALUE)(result) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(result) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(result))->flags & RUBY_T_MASK) == RUBY_T_FLOAT)) && (((cmp_opt).opt_inited & (1U << cmp_opt_Float)) ? ((cmp_opt).opt_methods & (1U << cmp_opt_Float)) : (((cmp_opt).opt_inited |= (1U << cmp_opt_Float)), __extension__({ static struct rb_call_data rb_mbdp; (rb_cFloat == ((VALUE)RUBY_Qfalse)) ? 1 : rb_method_basic_definition_p_with_cc(&rb_mbdp, rb_cFloat, idCmp); }) && ((cmp_opt).opt_methods |= (1U << cmp_opt_Float))))) ? rb_float_cmp(v, result) : rb_cmpint(__extension__({ static struct rb_call_data rb_funcallv_data; rb_funcallv_with_cc(&rb_funcallv_data, v, idCmp, 1, &result); }), v, result)) < 0) {
14599 result = v;
14600 }
14601 }
14602 return result;
14603 }
14604 }
14605 else {
14606 VALUE ary = rb_ary_new_from_values(num, ptr);
14607 return __extension__({ const int rb_funcall_argc = (0); const VALUE rb_funcall_args[] = {}; const int rb_funcall_nargs = (int)(sizeof(rb_funcall_args) / sizeof(VALUE)); __extension__({ static struct rb_call_data rb_funcallv_data; rb_funcallv_with_cc(&rb_funcallv_data, ary, idMin, __builtin_choose_expr(__builtin_constant_p(rb_funcall_argc), (((rb_funcall_argc) == 0 ? (rb_funcall_nargs) <= 1 : (rb_funcall_argc) == (rb_funcall_nargs)) ? (rb_funcall_argc) : rb_varargs_bad_length(rb_funcall_argc, rb_funcall_nargs)), (((rb_funcall_argc) <= (rb_funcall_nargs)) ? (rb_funcall_argc) : (rb_fatal("argc(%d) exceeds actual arguments(%d)", rb_funcall_argc, rb_funcall_nargs), 0))), rb_funcall_nargs ? rb_funcall_args : ((void *)0)); }); });
14608 }
14609}
14610static int
14611vm_ic_hit_p(IC ic, const VALUE *reg_ep)
14612{
14613 if (ic->ic_serial == (ruby_vm_global_constant_state)) {
14614 return (ic->ic_cref == ((void *)0) ||
14615 ic->ic_cref == vm_get_cref(reg_ep));
14616 }
14617 return 0;
14618}
14619static void
14620vm_ic_update(IC ic, VALUE val, const VALUE *reg_ep)
14621{
14622 ((void)0);
14623 ic->value = val;
14624 ic->ic_serial = (ruby_vm_global_constant_state) - ruby_vm_const_missing_count;
14625 ic->ic_cref = vm_get_const_key_cref(reg_ep);
14626 ruby_vm_const_missing_count = 0;
14627}
14628static VALUE
14629vm_once_dispatch(rb_execution_context_t *ec, ISEQ iseq, ISE is)
14630{
14631 rb_thread_t *th = rb_ec_thread_ptr(ec);
14632 rb_thread_t *const RUNNING_THREAD_ONCE_DONE = (rb_thread_t *)(0x1);
14633 again:
14634 if (is->once.running_thread == RUNNING_THREAD_ONCE_DONE) {
14635 return is->once.value;
14636 }
14637 else if (is->once.running_thread == ((void *)0)) {
14638 VALUE val;
14639 is->once.running_thread = th;
14640 val = rb_ensure(vm_once_exec, (VALUE)iseq, vm_once_clear, (VALUE)is);
14641 __extension__({
14642;
14643; typeof(rb_obj_write((VALUE)(ec->cfp->iseq), (VALUE *)(&is->once.value), (VALUE)(val), "./vm_insnhelper.c", 4160)) unaligned_member_access_result = (rb_obj_write((VALUE)(ec->cfp->iseq), (VALUE *)(&is->once.value), (VALUE)(val), "./vm_insnhelper.c", 4160));
14644; unaligned_member_access_result; });
14645 is->once.running_thread = RUNNING_THREAD_ONCE_DONE;
14646 return val;
14647 }
14648 else if (is->once.running_thread == th) {
14649 return vm_once_exec((VALUE)iseq);
14650 }
14651 else {
14652 rb_vm_check_ints(ec);
14654 goto again;
14655 }
14656}
14657static OFFSET
14658vm_case_dispatch(CDHASH hash, OFFSET else_offset, VALUE key)
14659{
14660 switch (__extension__({ VALUE arg_obj = (key); (((VALUE)(arg_obj) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(arg_obj) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) ? -1 : (int)(((struct RBasic*)(arg_obj))->flags & RUBY_T_MASK); })) {
14661 case -1:
14662 case RUBY_T_FLOAT:
14663 case RUBY_T_SYMBOL:
14664 case RUBY_T_BIGNUM:
14665 case RUBY_T_STRING:
14666 if (((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_EQQ)]&((1 << 6) | (1 << 0) | (1 << 1) | (1 << 9) | (1 << 10) | (1 << 11) | (1 << 2))) == 0), 1)))) {
14667 st_data_t val;
14668 if (( ((((int)(long)(key))&RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG) || (!(((VALUE)(key) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(key) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(key))->flags & RUBY_T_MASK) == RUBY_T_FLOAT))) {
14669 double kval = rb_float_value_inline(key);
14670 if (!__builtin_isinf_sign (kval) && modf(kval, &kval) == 0.0) {
14671 key = (((kval) < (0x7fffffffffffffffL>>1)+1) && ((kval) >= (((long)(-0x7fffffffffffffffL - 1L))>>(int)(1)))) ? (((VALUE)((long)kval))<<1 | RUBY_FIXNUM_FLAG) : rb_dbl2big(kval);
14672 }
14673 }
14674 if (rb_hash_stlike_lookup(hash, key, &val)) {
14675 return ((long)(((long)((VALUE)val))>>(int)(1)));
14676 }
14677 else {
14678 return else_offset;
14679 }
14680 }
14681 }
14682 return 0;
14683}
14684__attribute__ ((__noreturn__)) static void vm_stack_consistency_error(const rb_execution_context_t *ec, const rb_control_frame_t *, const VALUE *);
14685static void
14686vm_stack_consistency_error(const rb_execution_context_t *ec,
14687 const rb_control_frame_t *cfp,
14688 const VALUE *bp)
14689{
14690 const ptrdiff_t nsp = ((cfp->sp) - (ec)->vm_stack);
14691 const ptrdiff_t nbp = ((bp) - (ec)->vm_stack);
14692 static const char stack_consistency_error[] =
14693 "Stack consistency error (sp: %""t""d"", bp: %""t""d"")";
14694 rb_bug(stack_consistency_error, nsp, nbp);
14695}
14696ALWAYS_INLINE(static inline VALUE
14697vm_opt_plus(VALUE recv, VALUE obj));
14698static inline VALUE
14699vm_opt_plus(VALUE recv, VALUE obj) {
14700 if (FIXNUM_2_P(recv, obj) &&
14701 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_PLUS)]&((1 << 0))) == 0), 1)))) {
14702 return rb_fix_plus_fix(recv, obj);
14703 }
14704 else if (FLONUM_2_P(recv, obj) &&
14705 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_PLUS)]&((1 << 1))) == 0), 1)))) {
14706 return rb_float_new_inline(rb_float_value_inline(recv) + rb_float_value_inline(obj));
14707 }
14708 else if ((((VALUE)(recv) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(recv) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) || (((VALUE)(obj) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(obj) & (VALUE)~((VALUE)RUBY_Qnil)) == 0))) {
14709 return ((VALUE)RUBY_Qundef);
14710 }
14711 else if ((((struct RBasic*)(recv))->klass) == rb_cFloat &&
14712 (((struct RBasic*)(obj))->klass) == rb_cFloat &&
14713 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_PLUS)]&((1 << 1))) == 0), 1)))) {
14714 return rb_float_new_inline(rb_float_value_inline(recv) + rb_float_value_inline(obj));
14715 }
14716 else if ((((struct RBasic*)(recv))->klass) == rb_cString &&
14717 (((struct RBasic*)(obj))->klass) == rb_cString &&
14718 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_PLUS)]&((1 << 2))) == 0), 1)))) {
14719 return rb_str_opt_plus(recv, obj);
14720 }
14721 else if ((((struct RBasic*)(recv))->klass) == rb_cArray &&
14722 (((struct RBasic*)(obj))->klass) == rb_cArray &&
14723 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_PLUS)]&((1 << 3))) == 0), 1)))) {
14724 return rb_ary_plus(recv, obj);
14725 }
14726 else {
14727 return ((VALUE)RUBY_Qundef);
14728 }
14729}
14730ALWAYS_INLINE(static inline VALUE
14731vm_opt_minus(VALUE recv, VALUE obj));
14732static inline VALUE
14733vm_opt_minus(VALUE recv, VALUE obj) {
14734 if (FIXNUM_2_P(recv, obj) &&
14735 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_MINUS)]&((1 << 0))) == 0), 1)))) {
14736 return rb_fix_minus_fix(recv, obj);
14737 }
14738 else if (FLONUM_2_P(recv, obj) &&
14739 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_MINUS)]&((1 << 1))) == 0), 1)))) {
14740 return rb_float_new_inline(rb_float_value_inline(recv) - rb_float_value_inline(obj));
14741 }
14742 else if ((((VALUE)(recv) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(recv) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) || (((VALUE)(obj) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(obj) & (VALUE)~((VALUE)RUBY_Qnil)) == 0))) {
14743 return ((VALUE)RUBY_Qundef);
14744 }
14745 else if ((((struct RBasic*)(recv))->klass) == rb_cFloat &&
14746 (((struct RBasic*)(obj))->klass) == rb_cFloat &&
14747 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_MINUS)]&((1 << 1))) == 0), 1)))) {
14748 return rb_float_new_inline(rb_float_value_inline(recv) - rb_float_value_inline(obj));
14749 }
14750 else {
14751 return ((VALUE)RUBY_Qundef);
14752 }
14753}
14754ALWAYS_INLINE(static inline VALUE
14755vm_opt_mult(VALUE recv, VALUE obj));
14756static inline VALUE
14757vm_opt_mult(VALUE recv, VALUE obj) {
14758 if (FIXNUM_2_P(recv, obj) &&
14759 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_MULT)]&((1 << 0))) == 0), 1)))) {
14760 return rb_fix_mul_fix(recv, obj);
14761 }
14762 else if (FLONUM_2_P(recv, obj) &&
14763 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_MULT)]&((1 << 1))) == 0), 1)))) {
14764 return rb_float_new_inline(rb_float_value_inline(recv) * rb_float_value_inline(obj));
14765 }
14766 else if ((((VALUE)(recv) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(recv) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) || (((VALUE)(obj) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(obj) & (VALUE)~((VALUE)RUBY_Qnil)) == 0))) {
14767 return ((VALUE)RUBY_Qundef);
14768 }
14769 else if ((((struct RBasic*)(recv))->klass) == rb_cFloat &&
14770 (((struct RBasic*)(obj))->klass) == rb_cFloat &&
14771 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_MULT)]&((1 << 1))) == 0), 1)))) {
14772 return rb_float_new_inline(rb_float_value_inline(recv) * rb_float_value_inline(obj));
14773 }
14774 else {
14775 return ((VALUE)RUBY_Qundef);
14776 }
14777}
14778ALWAYS_INLINE(static inline VALUE
14779vm_opt_div(VALUE recv, VALUE obj));
14780static inline VALUE
14781vm_opt_div(VALUE recv, VALUE obj) {
14782 if (FIXNUM_2_P(recv, obj) &&
14783 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_DIV)]&((1 << 0))) == 0), 1)))) {
14784 return (((long)(((long)(obj))>>(int)(1))) == 0) ? ((VALUE)RUBY_Qundef) : rb_fix_div_fix(recv, obj);
14785 }
14786 else if (FLONUM_2_P(recv, obj) &&
14787 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_DIV)]&((1 << 1))) == 0), 1)))) {
14788 return rb_flo_div_flo(recv, obj);
14789 }
14790 else if ((((VALUE)(recv) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(recv) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) || (((VALUE)(obj) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(obj) & (VALUE)~((VALUE)RUBY_Qnil)) == 0))) {
14791 return ((VALUE)RUBY_Qundef);
14792 }
14793 else if ((((struct RBasic*)(recv))->klass) == rb_cFloat &&
14794 (((struct RBasic*)(obj))->klass) == rb_cFloat &&
14795 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_DIV)]&((1 << 1))) == 0), 1)))) {
14796 return rb_flo_div_flo(recv, obj);
14797 }
14798 else {
14799 return ((VALUE)RUBY_Qundef);
14800 }
14801}
14802ALWAYS_INLINE(static inline VALUE
14803vm_opt_mod(VALUE recv, VALUE obj));
14804static inline VALUE
14805vm_opt_mod(VALUE recv, VALUE obj) {
14806 if (FIXNUM_2_P(recv, obj) &&
14807 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_MOD)]&((1 << 0))) == 0), 1)))) {
14808 return (((long)(((long)(obj))>>(int)(1))) == 0) ? ((VALUE)RUBY_Qundef) : rb_fix_mod_fix(recv, obj);
14809 }
14810 else if (FLONUM_2_P(recv, obj) &&
14811 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_MOD)]&((1 << 1))) == 0), 1)))) {
14812 return rb_float_new_inline(ruby_float_mod(rb_float_value_inline(recv), rb_float_value_inline(obj)));
14813 }
14814 else if ((((VALUE)(recv) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(recv) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) || (((VALUE)(obj) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(obj) & (VALUE)~((VALUE)RUBY_Qnil)) == 0))) {
14815 return ((VALUE)RUBY_Qundef);
14816 }
14817 else if ((((struct RBasic*)(recv))->klass) == rb_cFloat &&
14818 (((struct RBasic*)(obj))->klass) == rb_cFloat &&
14819 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_MOD)]&((1 << 1))) == 0), 1)))) {
14820 return rb_float_new_inline(ruby_float_mod(rb_float_value_inline(recv), rb_float_value_inline(obj)));
14821 }
14822 else {
14823 return ((VALUE)RUBY_Qundef);
14824 }
14825}
14826ALWAYS_INLINE(static inline VALUE
14827vm_opt_neq(CALL_DATA cd, CALL_DATA cd_eq, VALUE recv, VALUE obj));
14828static inline VALUE
14829vm_opt_neq(CALL_DATA cd, CALL_DATA cd_eq, VALUE recv, VALUE obj) {
14830 if (vm_method_cfunc_is(cd, recv, rb_obj_not_equal)) {
14831 VALUE val = opt_eq_func(recv, obj, cd_eq);
14832 if (val != ((VALUE)RUBY_Qundef)) {
14833 return !(((VALUE)(val) & (VALUE)~((VALUE)RUBY_Qnil)) == 0) ? ((VALUE)RUBY_Qfalse) : ((VALUE)RUBY_Qtrue);
14834 }
14835 }
14836 return ((VALUE)RUBY_Qundef);
14837}
14838ALWAYS_INLINE(static inline VALUE
14839vm_opt_lt(VALUE recv, VALUE obj));
14840static inline VALUE
14841vm_opt_lt(VALUE recv, VALUE obj) {
14842 if (FIXNUM_2_P(recv, obj) &&
14843 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_LT)]&((1 << 0))) == 0), 1)))) {
14844 return (long)recv < (long)obj ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse);
14845 }
14846 else if (FLONUM_2_P(recv, obj) &&
14847 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_LT)]&((1 << 1))) == 0), 1)))) {
14848 return rb_float_value_inline(recv) < rb_float_value_inline(obj) ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse);
14849 }
14850 else if ((((VALUE)(recv) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(recv) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) || (((VALUE)(obj) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(obj) & (VALUE)~((VALUE)RUBY_Qnil)) == 0))) {
14851 return ((VALUE)RUBY_Qundef);
14852 }
14853 else if ((((struct RBasic*)(recv))->klass) == rb_cFloat &&
14854 (((struct RBasic*)(obj))->klass) == rb_cFloat &&
14855 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_LT)]&((1 << 1))) == 0), 1)))) {
14856 ;
14857 return rb_float_value_inline(recv) < rb_float_value_inline(obj) ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse);
14858 }
14859 else {
14860 return ((VALUE)RUBY_Qundef);
14861 }
14862}
14863ALWAYS_INLINE(static inline VALUE
14864vm_opt_le(VALUE recv, VALUE obj));
14865static inline VALUE
14866vm_opt_le(VALUE recv, VALUE obj) {
14867 if (FIXNUM_2_P(recv, obj) &&
14868 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_LE)]&((1 << 0))) == 0), 1)))) {
14869 return (long)recv <= (long)obj ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse);
14870 }
14871 else if (FLONUM_2_P(recv, obj) &&
14872 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_LE)]&((1 << 1))) == 0), 1)))) {
14873 return rb_float_value_inline(recv) <= rb_float_value_inline(obj) ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse);
14874 }
14875 else if ((((VALUE)(recv) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(recv) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) || (((VALUE)(obj) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(obj) & (VALUE)~((VALUE)RUBY_Qnil)) == 0))) {
14876 return ((VALUE)RUBY_Qundef);
14877 }
14878 else if ((((struct RBasic*)(recv))->klass) == rb_cFloat &&
14879 (((struct RBasic*)(obj))->klass) == rb_cFloat &&
14880 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_LE)]&((1 << 1))) == 0), 1)))) {
14881 ;
14882 return rb_float_value_inline(recv) <= rb_float_value_inline(obj) ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse);
14883 }
14884 else {
14885 return ((VALUE)RUBY_Qundef);
14886 }
14887}
14888ALWAYS_INLINE(static inline VALUE
14889vm_opt_gt(VALUE recv, VALUE obj));
14890static inline VALUE
14891vm_opt_gt(VALUE recv, VALUE obj) {
14892 if (FIXNUM_2_P(recv, obj) &&
14893 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_GT)]&((1 << 0))) == 0), 1)))) {
14894 return (long)recv > (long)obj ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse);
14895 }
14896 else if (FLONUM_2_P(recv, obj) &&
14897 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_GT)]&((1 << 1))) == 0), 1)))) {
14898 return rb_float_value_inline(recv) > rb_float_value_inline(obj) ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse);
14899 }
14900 else if ((((VALUE)(recv) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(recv) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) || (((VALUE)(obj) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(obj) & (VALUE)~((VALUE)RUBY_Qnil)) == 0))) {
14901 return ((VALUE)RUBY_Qundef);
14902 }
14903 else if ((((struct RBasic*)(recv))->klass) == rb_cFloat &&
14904 (((struct RBasic*)(obj))->klass) == rb_cFloat &&
14905 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_GT)]&((1 << 1))) == 0), 1)))) {
14906 ;
14907 return rb_float_value_inline(recv) > rb_float_value_inline(obj) ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse);
14908 }
14909 else {
14910 return ((VALUE)RUBY_Qundef);
14911 }
14912}
14913ALWAYS_INLINE(static inline VALUE
14914vm_opt_ge(VALUE recv, VALUE obj));
14915static inline VALUE
14916vm_opt_ge(VALUE recv, VALUE obj) {
14917 if (FIXNUM_2_P(recv, obj) &&
14918 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_GE)]&((1 << 0))) == 0), 1)))) {
14919 return (long)recv >= (long)obj ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse);
14920 }
14921 else if (FLONUM_2_P(recv, obj) &&
14922 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_GE)]&((1 << 1))) == 0), 1)))) {
14923 return rb_float_value_inline(recv) >= rb_float_value_inline(obj) ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse);
14924 }
14925 else if ((((VALUE)(recv) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(recv) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) || (((VALUE)(obj) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(obj) & (VALUE)~((VALUE)RUBY_Qnil)) == 0))) {
14926 return ((VALUE)RUBY_Qundef);
14927 }
14928 else if ((((struct RBasic*)(recv))->klass) == rb_cFloat &&
14929 (((struct RBasic*)(obj))->klass) == rb_cFloat &&
14930 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_GE)]&((1 << 1))) == 0), 1)))) {
14931 ;
14932 return rb_float_value_inline(recv) >= rb_float_value_inline(obj) ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse);
14933 }
14934 else {
14935 return ((VALUE)RUBY_Qundef);
14936 }
14937}
14938ALWAYS_INLINE(static inline VALUE
14939vm_opt_ltlt(VALUE recv, VALUE obj));
14940static inline VALUE
14941vm_opt_ltlt(VALUE recv, VALUE obj) {
14942 if ((((VALUE)(recv) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(recv) & (VALUE)~((VALUE)RUBY_Qnil)) == 0))) {
14943 return ((VALUE)RUBY_Qundef);
14944 }
14945 else if ((((struct RBasic*)(recv))->klass) == rb_cString &&
14946 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_LTLT)]&((1 << 2))) == 0), 1)))) {
14947 return rb_str_concat(recv, obj);
14948 }
14949 else if ((((struct RBasic*)(recv))->klass) == rb_cArray &&
14950 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_LTLT)]&((1 << 3))) == 0), 1)))) {
14951 return rb_ary_push(recv, obj);
14952 }
14953 else {
14954 return ((VALUE)RUBY_Qundef);
14955 }
14956}
14957ALWAYS_INLINE(static inline VALUE
14958vm_opt_and(VALUE recv, VALUE obj));
14959static inline VALUE
14960vm_opt_and(VALUE recv, VALUE obj) {
14961 if (FIXNUM_2_P(recv, obj) &&
14962 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_AND)]&((1 << 0))) == 0), 1)))) {
14963 return (recv & obj) | 1;
14964 }
14965 else {
14966 return ((VALUE)RUBY_Qundef);
14967 }
14968}
14969ALWAYS_INLINE(static inline VALUE
14970vm_opt_or(VALUE recv, VALUE obj));
14971static inline VALUE
14972vm_opt_or(VALUE recv, VALUE obj) {
14973 if (FIXNUM_2_P(recv, obj) &&
14974 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_OR)]&((1 << 0))) == 0), 1)))) {
14975 return recv | obj;
14976 }
14977 else {
14978 return ((VALUE)RUBY_Qundef);
14979 }
14980}
14981ALWAYS_INLINE(static inline VALUE
14982vm_opt_aref(VALUE recv, VALUE obj));
14983static inline VALUE
14984vm_opt_aref(VALUE recv, VALUE obj) {
14985 if ((((VALUE)(recv) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(recv) & (VALUE)~((VALUE)RUBY_Qnil)) == 0))) {
14986 if (FIXNUM_2_P(recv, obj) &&
14987 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_AREF)]&((1 << 0))) == 0), 1)))) {
14988 return rb_fix_aref(recv, obj);
14989 }
14990 return ((VALUE)RUBY_Qundef);
14991 }
14992 else if ((((struct RBasic*)(recv))->klass) == rb_cArray &&
14993 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_AREF)]&((1 << 3))) == 0), 1)))) {
14994 if ((((int)(long)(obj))&RUBY_FIXNUM_FLAG)) {
14995 return rb_ary_entry_internal(recv, ((long)(((long)(obj))>>(int)(1))));
14996 }
14997 else {
14998 return rb_ary_aref1(recv, obj);
14999 }
15000 }
15001 else if ((((struct RBasic*)(recv))->klass) == rb_cHash &&
15002 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_AREF)]&((1 << 4))) == 0), 1)))) {
15003 return rb_hash_aref(recv, obj);
15004 }
15005 else {
15006 return ((VALUE)RUBY_Qundef);
15007 }
15008}
15009ALWAYS_INLINE(static inline VALUE
15010vm_opt_aset(VALUE recv, VALUE obj, VALUE set));
15011static inline VALUE
15012vm_opt_aset(VALUE recv, VALUE obj, VALUE set) {
15013 if ((((VALUE)(recv) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(recv) & (VALUE)~((VALUE)RUBY_Qnil)) == 0))) {
15014 return ((VALUE)RUBY_Qundef);
15015 }
15016 else if ((((struct RBasic*)(recv))->klass) == rb_cArray &&
15017 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_ASET)]&((1 << 3))) == 0), 1))) &&
15018 (((int)(long)(obj))&RUBY_FIXNUM_FLAG)) {
15019 rb_ary_store(recv, ((long)(((long)(obj))>>(int)(1))), set);
15020 return set;
15021 }
15022 else if ((((struct RBasic*)(recv))->klass) == rb_cHash &&
15023 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_ASET)]&((1 << 4))) == 0), 1)))) {
15024 rb_hash_aset(recv, obj, set);
15025 return set;
15026 }
15027 else {
15028 return ((VALUE)RUBY_Qundef);
15029 }
15030}
15031ALWAYS_INLINE(static inline VALUE
15032vm_opt_aref_with(VALUE recv, VALUE key));
15033static inline VALUE
15034vm_opt_aref_with(VALUE recv, VALUE key) {
15035 if (!(((VALUE)(recv) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(recv) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (((struct RBasic*)(recv))->klass) == rb_cHash &&
15036 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_AREF)]&((1 << 4))) == 0), 1))) &&
15037 rb_hash_compare_by_id_p(recv) == ((VALUE)RUBY_Qfalse)) {
15038 return rb_hash_aref(recv, key);
15039 }
15040 else {
15041 return ((VALUE)RUBY_Qundef);
15042 }
15043}
15044ALWAYS_INLINE(static inline VALUE
15045vm_opt_aset_with(VALUE recv, VALUE key, VALUE val));
15046static inline VALUE
15047vm_opt_aset_with(VALUE recv, VALUE key, VALUE val) {
15048 if (!(((VALUE)(recv) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(recv) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (((struct RBasic*)(recv))->klass) == rb_cHash &&
15049 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_ASET)]&((1 << 4))) == 0), 1))) &&
15050 rb_hash_compare_by_id_p(recv) == ((VALUE)RUBY_Qfalse)) {
15051 return rb_hash_aset(recv, key, val);
15052 }
15053 else {
15054 return ((VALUE)RUBY_Qundef);
15055 }
15056}
15057static VALUE
15058vm_opt_length(VALUE recv, int bop)
15059{
15060 if ((((VALUE)(recv) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(recv) & (VALUE)~((VALUE)RUBY_Qnil)) == 0))) {
15061 return ((VALUE)RUBY_Qundef);
15062 }
15063 else if ((((struct RBasic*)(recv))->klass) == rb_cString &&
15064 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(bop)]&((1 << 2))) == 0), 1)))) {
15065 if (bop == BOP_EMPTY_P) {
15066 return rb_long2num_inline((!(((struct RBasic*)(recv))->flags & RSTRING_NOEMBED) ? (long)((((struct RBasic*)(recv))->flags >> RSTRING_EMBED_LEN_SHIFT) & (RSTRING_EMBED_LEN_MASK >> RSTRING_EMBED_LEN_SHIFT)) : ((struct RString*)(recv))->as.heap.len));
15067 }
15068 else {
15069 return rb_str_length(recv);
15070 }
15071 }
15072 else if ((((struct RBasic*)(recv))->klass) == rb_cArray &&
15073 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(bop)]&((1 << 3))) == 0), 1)))) {
15074 return rb_long2num_inline(rb_array_len(recv));
15075 }
15076 else if ((((struct RBasic*)(recv))->klass) == rb_cHash &&
15077 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(bop)]&((1 << 4))) == 0), 1)))) {
15078 return (((VALUE)(((!(((struct RBasic*)((recv)))->flags&(RHASH_ST_TABLE_FLAG))) ? ((unsigned int)((((struct RBasic*)(recv))->flags & (VALUE)RHASH_AR_TABLE_SIZE_MASK) >> RHASH_AR_TABLE_SIZE_SHIFT)) : ((((struct RHash*)(recv))->as.st)->num_entries))))<<1 | RUBY_FIXNUM_FLAG);
15079 }
15080 else {
15081 return ((VALUE)RUBY_Qundef);
15082 }
15083}
15084static VALUE
15085vm_opt_empty_p(VALUE recv)
15086{
15087 switch (vm_opt_length(recv, BOP_EMPTY_P)) {
15088 case ((VALUE)RUBY_Qundef): return ((VALUE)RUBY_Qundef);
15089 case (((VALUE)(0))<<1 | RUBY_FIXNUM_FLAG): return ((VALUE)RUBY_Qtrue);
15090 default: return ((VALUE)RUBY_Qfalse);
15091 }
15092}
15093VALUE rb_false(VALUE obj);
15094static VALUE
15095vm_opt_nil_p(CALL_DATA cd, VALUE recv)
15096{
15097 if (recv == ((VALUE)RUBY_Qnil) &&
15098 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_NIL_P)]&((1 << 9))) == 0), 1)))) {
15099 return ((VALUE)RUBY_Qtrue);
15100 }
15101 else if (vm_method_cfunc_is(cd, recv, rb_false)) {
15102 return ((VALUE)RUBY_Qfalse);
15103 }
15104 else {
15105 return ((VALUE)RUBY_Qundef);
15106 }
15107}
15108static VALUE
15109fix_succ(VALUE x)
15110{
15111 switch (x) {
15112 case ~0UL:
15113 return (((VALUE)(0))<<1 | RUBY_FIXNUM_FLAG);
15114 case ((~0UL)>>(int)(1)):
15115 return rb_uint2big(1UL << (8 * 8 - 2));
15116 default:
15117 return x + 2;
15118 }
15119}
15120static VALUE
15121vm_opt_succ(VALUE recv)
15122{
15123 if ((((int)(long)(recv))&RUBY_FIXNUM_FLAG) &&
15124 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_SUCC)]&((1 << 0))) == 0), 1)))) {
15125 return fix_succ(recv);
15126 }
15127 else if ((((VALUE)(recv) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(recv) & (VALUE)~((VALUE)RUBY_Qnil)) == 0))) {
15128 return ((VALUE)RUBY_Qundef);
15129 }
15130 else if ((((struct RBasic*)(recv))->klass) == rb_cString &&
15131 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_SUCC)]&((1 << 2))) == 0), 1)))) {
15132 return rb_str_succ(recv);
15133 }
15134 else {
15135 return ((VALUE)RUBY_Qundef);
15136 }
15137}
15138ALWAYS_INLINE(static inline VALUE
15139vm_opt_not(CALL_DATA cd, VALUE recv));
15140static inline VALUE
15141vm_opt_not(CALL_DATA cd, VALUE recv) {
15142 if (vm_method_cfunc_is(cd, recv, rb_obj_not)) {
15143 return !(((VALUE)(recv) & (VALUE)~((VALUE)RUBY_Qnil)) == 0) ? ((VALUE)RUBY_Qfalse) : ((VALUE)RUBY_Qtrue);
15144 }
15145 else {
15146 return ((VALUE)RUBY_Qundef);
15147 }
15148}
15149static VALUE
15150vm_opt_regexpmatch2(VALUE recv, VALUE obj)
15151{
15152 if ((((VALUE)(recv) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(recv) & (VALUE)~((VALUE)RUBY_Qnil)) == 0))) {
15153 return ((VALUE)RUBY_Qundef);
15154 }
15155 else if ((((struct RBasic*)(recv))->klass) == rb_cString &&
15156 rb_class_of((VALUE)(obj)) == rb_cRegexp &&
15157 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_MATCH)]&((1 << 2))) == 0), 1)))) {
15158 return rb_reg_match(obj, recv);
15159 }
15160 else if ((((struct RBasic*)(recv))->klass) == rb_cRegexp &&
15161 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_MATCH)]&((1 << 8))) == 0), 1)))) {
15162 return rb_reg_match(recv, obj);
15163 }
15164 else {
15165 return ((VALUE)RUBY_Qundef);
15166 }
15167}
15168rb_event_flag_t rb_iseq_event_flags(const rb_iseq_t *iseq, size_t pos);
15169__attribute__ ((__noinline__)) static void vm_trace(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, const VALUE *pc);
15170static inline void
15171vm_trace_hook(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, const VALUE *pc,
15172 rb_event_flag_t pc_events, rb_event_flag_t target_event,
15173 rb_hook_list_t *global_hooks, rb_hook_list_t *local_hooks, VALUE val)
15174{
15175 rb_event_flag_t event = pc_events & target_event;
15176 VALUE self = (((((reg_cfp)))->self));
15177 ((void)0);
15178 if (event & global_hooks->events) {
15179 reg_cfp->pc++;
15180 vm_dtrace(event, ec);
15181 rb_exec_event_hook_orig(ec, global_hooks, event, self, 0, 0, 0 , val, 0);
15182 reg_cfp->pc--;
15183 }
15184 if (local_hooks != ((void *)0)) {
15185 if (event & local_hooks->events) {
15186 reg_cfp->pc++;
15187 rb_exec_event_hook_orig(ec, local_hooks, event, self, 0, 0, 0 , val, 0);
15188 reg_cfp->pc--;
15189 }
15190 }
15191}
15192static void
15193vm_trace(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, const VALUE *pc)
15194{
15195 rb_event_flag_t enabled_flags = ruby_vm_event_flags & (0x0001 | 0x0002 | 0x0004 | 0x0008 | 0x0010| 0x0100| 0x0200| 0x010000| 0x020000);
15196 if (enabled_flags == 0 && ruby_vm_event_local_num == 0) {
15197 return;
15198 }
15199 else {
15200 const rb_iseq_t *iseq = reg_cfp->iseq;
15201 size_t pos = pc - iseq->body->iseq_encoded;
15202 rb_event_flag_t pc_events = rb_iseq_event_flags(iseq, pos);
15203 rb_hook_list_t *local_hooks = iseq->aux.exec.local_hooks;
15204 rb_event_flag_t local_hook_events = local_hooks != ((void *)0) ? local_hooks->events : 0;
15205 enabled_flags |= local_hook_events;
15206 ((void)0);
15207 if ((pc_events & enabled_flags) == 0) {
15208 return;
15209 }
15210 else if (ec->trace_arg != ((void *)0)) {
15211 return;
15212 }
15213 else {
15214 rb_hook_list_t *global_hooks = rb_vm_global_hooks(ec);
15215 if (0) {
15216 fprintf(stderr, "vm_trace>>%4d (%4x) - %s:%d %s\n",
15217 (int)pos,
15218 (int)pc_events,
15219 (!(((struct RBasic*)(rb_iseq_path(iseq)))->flags & RSTRING_NOEMBED) ? ((struct RString*)(rb_iseq_path(iseq)))->as.ary : ((struct RString*)(rb_iseq_path(iseq)))->as.heap.ptr),
15220 (int)rb_iseq_line_no(iseq, pos),
15221 (!(((struct RBasic*)(rb_iseq_label(iseq)))->flags & RSTRING_NOEMBED) ? ((struct RString*)(rb_iseq_label(iseq)))->as.ary : ((struct RString*)(rb_iseq_label(iseq)))->as.heap.ptr));
15222 }
15223 ((void)0);
15224 ((void)0);
15225 ((void)0);
15226 do { if ((pc_events & (0x0002 | 0x0008 | 0x0100)) & enabled_flags) { vm_trace_hook(ec, reg_cfp, pc, pc_events, (0x0002 | 0x0008 | 0x0100), global_hooks, local_hooks, (((VALUE)RUBY_Qundef))); } } while (0);
15227 do { if ((pc_events & (0x0001)) & enabled_flags) { vm_trace_hook(ec, reg_cfp, pc, pc_events, (0x0001), global_hooks, local_hooks, (((VALUE)RUBY_Qundef))); } } while (0);
15228 do { if ((pc_events & (0x010000)) & enabled_flags) { vm_trace_hook(ec, reg_cfp, pc, pc_events, (0x010000), global_hooks, local_hooks, (((VALUE)RUBY_Qundef))); } } while (0);
15229 do { if ((pc_events & (0x020000)) & enabled_flags) { vm_trace_hook(ec, reg_cfp, pc, pc_events, (0x020000), global_hooks, local_hooks, (((VALUE)RUBY_Qundef))); } } while (0);
15230 do { if ((pc_events & (0x0004 | 0x0010 | 0x0200)) & enabled_flags) { vm_trace_hook(ec, reg_cfp, pc, pc_events, (0x0004 | 0x0010 | 0x0200), global_hooks, local_hooks, ((*(((((reg_cfp)->sp)))-(0)-1)))); } } while (0);
15231 }
15232 }
15233}static inline
15234void Init_vm_stack_canary(void) { }
15235static VALUE
15236builtin_invoker0(rb_execution_context_t *ec, VALUE self, const VALUE *argv, rb_insn_func_t funcptr)
15237{
15238 typedef VALUE (*rb_invoke_funcptr0_t)(rb_execution_context_t *ec, VALUE self);
15239 return (*(rb_invoke_funcptr0_t)funcptr)(ec, self);
15240}
15241static VALUE
15242builtin_invoker1(rb_execution_context_t *ec, VALUE self, const VALUE *argv, rb_insn_func_t funcptr)
15243{
15244 typedef VALUE (*rb_invoke_funcptr1_t)(rb_execution_context_t *ec, VALUE self, VALUE v1);
15245 return (*(rb_invoke_funcptr1_t)funcptr)(ec, self, argv[0]);
15246}
15247static VALUE
15248builtin_invoker2(rb_execution_context_t *ec, VALUE self, const VALUE *argv, rb_insn_func_t funcptr)
15249{
15250 typedef VALUE (*rb_invoke_funcptr2_t)(rb_execution_context_t *ec, VALUE self, VALUE v1, VALUE v2);
15251 return (*(rb_invoke_funcptr2_t)funcptr)(ec, self, argv[0], argv[1]);
15252}
15253static VALUE
15254builtin_invoker3(rb_execution_context_t *ec, VALUE self, const VALUE *argv, rb_insn_func_t funcptr)
15255{
15256 typedef VALUE (*rb_invoke_funcptr3_t)(rb_execution_context_t *ec, VALUE self, VALUE v1, VALUE v2, VALUE v3);
15257 return (*(rb_invoke_funcptr3_t)funcptr)(ec, self, argv[0], argv[1], argv[2]);
15258}
15259static VALUE
15260builtin_invoker4(rb_execution_context_t *ec, VALUE self, const VALUE *argv, rb_insn_func_t funcptr)
15261{
15262 typedef VALUE (*rb_invoke_funcptr4_t)(rb_execution_context_t *ec, VALUE self, VALUE v1, VALUE v2, VALUE v3, VALUE v4);
15263 return (*(rb_invoke_funcptr4_t)funcptr)(ec, self, argv[0], argv[1], argv[2], argv[3]);
15264}
15265static VALUE
15266builtin_invoker5(rb_execution_context_t *ec, VALUE self, const VALUE *argv, rb_insn_func_t funcptr)
15267{
15268 typedef VALUE (*rb_invoke_funcptr5_t)(rb_execution_context_t *ec, VALUE self, VALUE v1, VALUE v2, VALUE v3, VALUE v4, VALUE v5);
15269 return (*(rb_invoke_funcptr5_t)funcptr)(ec, self, argv[0], argv[1], argv[2], argv[3], argv[4]);
15270}
15271static VALUE
15272builtin_invoker6(rb_execution_context_t *ec, VALUE self, const VALUE *argv, rb_insn_func_t funcptr)
15273{
15274 typedef VALUE (*rb_invoke_funcptr6_t)(rb_execution_context_t *ec, VALUE self, VALUE v1, VALUE v2, VALUE v3, VALUE v4, VALUE v5, VALUE v6);
15275 return (*(rb_invoke_funcptr6_t)funcptr)(ec, self, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5]);
15276}
15277static VALUE
15278builtin_invoker7(rb_execution_context_t *ec, VALUE self, const VALUE *argv, rb_insn_func_t funcptr)
15279{
15280 typedef VALUE (*rb_invoke_funcptr7_t)(rb_execution_context_t *ec, VALUE self, VALUE v1, VALUE v2, VALUE v3, VALUE v4, VALUE v5, VALUE v6, VALUE v7);
15281 return (*(rb_invoke_funcptr7_t)funcptr)(ec, self, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6]);
15282}
15283static VALUE
15284builtin_invoker8(rb_execution_context_t *ec, VALUE self, const VALUE *argv, rb_insn_func_t funcptr)
15285{
15286 typedef VALUE (*rb_invoke_funcptr8_t)(rb_execution_context_t *ec, VALUE self, VALUE v1, VALUE v2, VALUE v3, VALUE v4, VALUE v5, VALUE v6, VALUE v7, VALUE v8);
15287 return (*(rb_invoke_funcptr8_t)funcptr)(ec, self, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7]);
15288}
15289static VALUE
15290builtin_invoker9(rb_execution_context_t *ec, VALUE self, const VALUE *argv, rb_insn_func_t funcptr)
15291{
15292 typedef VALUE (*rb_invoke_funcptr9_t)(rb_execution_context_t *ec, VALUE self, VALUE v1, VALUE v2, VALUE v3, VALUE v4, VALUE v5, VALUE v6, VALUE v7, VALUE v8, VALUE v9);
15293 return (*(rb_invoke_funcptr9_t)funcptr)(ec, self, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8]);
15294}
15295static VALUE
15296builtin_invoker10(rb_execution_context_t *ec, VALUE self, const VALUE *argv, rb_insn_func_t funcptr)
15297{
15298 typedef VALUE (*rb_invoke_funcptr10_t)(rb_execution_context_t *ec, VALUE self, VALUE v1, VALUE v2, VALUE v3, VALUE v4, VALUE v5, VALUE v6, VALUE v7, VALUE v8, VALUE v9, VALUE v10);
15299 return (*(rb_invoke_funcptr10_t)funcptr)(ec, self, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8], argv[9]);
15300}
15301static VALUE
15302builtin_invoker11(rb_execution_context_t *ec, VALUE self, const VALUE *argv, rb_insn_func_t funcptr)
15303{
15304 typedef VALUE (*rb_invoke_funcptr11_t)(rb_execution_context_t *ec, VALUE self, VALUE v1, VALUE v2, VALUE v3, VALUE v4, VALUE v5, VALUE v6, VALUE v7, VALUE v8, VALUE v9, VALUE v10, VALUE v11);
15305 return (*(rb_invoke_funcptr11_t)funcptr)(ec, self, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8], argv[9], argv[10]);
15306}
15307static VALUE
15308builtin_invoker12(rb_execution_context_t *ec, VALUE self, const VALUE *argv, rb_insn_func_t funcptr)
15309{
15310 typedef VALUE (*rb_invoke_funcptr12_t)(rb_execution_context_t *ec, VALUE self, VALUE v1, VALUE v2, VALUE v3, VALUE v4, VALUE v5, VALUE v6, VALUE v7, VALUE v8, VALUE v9, VALUE v10, VALUE v11, VALUE v12);
15311 return (*(rb_invoke_funcptr12_t)funcptr)(ec, self, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8], argv[9], argv[10], argv[11]);
15312}
15313static VALUE
15314builtin_invoker13(rb_execution_context_t *ec, VALUE self, const VALUE *argv, rb_insn_func_t funcptr)
15315{
15316 typedef VALUE (*rb_invoke_funcptr13_t)(rb_execution_context_t *ec, VALUE self, VALUE v1, VALUE v2, VALUE v3, VALUE v4, VALUE v5, VALUE v6, VALUE v7, VALUE v8, VALUE v9, VALUE v10, VALUE v11, VALUE v12, VALUE v13);
15317 return (*(rb_invoke_funcptr13_t)funcptr)(ec, self, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8], argv[9], argv[10], argv[11], argv[12]);
15318}
15319static VALUE
15320builtin_invoker14(rb_execution_context_t *ec, VALUE self, const VALUE *argv, rb_insn_func_t funcptr)
15321{
15322 typedef VALUE (*rb_invoke_funcptr14_t)(rb_execution_context_t *ec, VALUE self, VALUE v1, VALUE v2, VALUE v3, VALUE v4, VALUE v5, VALUE v6, VALUE v7, VALUE v8, VALUE v9, VALUE v10, VALUE v11, VALUE v12, VALUE v13, VALUE v14);
15323 return (*(rb_invoke_funcptr14_t)funcptr)(ec, self, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8], argv[9], argv[10], argv[11], argv[12], argv[13]);
15324}
15325static VALUE
15326builtin_invoker15(rb_execution_context_t *ec, VALUE self, const VALUE *argv, rb_insn_func_t funcptr)
15327{
15328 typedef VALUE (*rb_invoke_funcptr15_t)(rb_execution_context_t *ec, VALUE self, VALUE v1, VALUE v2, VALUE v3, VALUE v4, VALUE v5, VALUE v6, VALUE v7, VALUE v8, VALUE v9, VALUE v10, VALUE v11, VALUE v12, VALUE v13, VALUE v14, VALUE v15);
15329 return (*(rb_invoke_funcptr15_t)funcptr)(ec, self, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8], argv[9], argv[10], argv[11], argv[12], argv[13], argv[14]);
15330}
15331typedef VALUE (*builtin_invoker)(rb_execution_context_t *ec, VALUE self, const VALUE *argv, rb_insn_func_t funcptr);
15332static builtin_invoker
15333lookup_builtin_invoker(int argc)
15334{
15335 static const builtin_invoker invokers[] = {
15336 builtin_invoker0,
15337 builtin_invoker1,
15338 builtin_invoker2,
15339 builtin_invoker3,
15340 builtin_invoker4,
15341 builtin_invoker5,
15342 builtin_invoker6,
15343 builtin_invoker7,
15344 builtin_invoker8,
15345 builtin_invoker9,
15346 builtin_invoker10,
15347 builtin_invoker11,
15348 builtin_invoker12,
15349 builtin_invoker13,
15350 builtin_invoker14,
15351 builtin_invoker15,
15352 };
15353 return invokers[argc];
15354}
15355static inline VALUE
15356invoke_bf(rb_execution_context_t *ec, rb_control_frame_t *cfp, const struct rb_builtin_function* bf, const VALUE *argv)
15357{
15358 VALUE self = cfp->self;
15359 return (*lookup_builtin_invoker(bf->argc))(ec, self, argv, (rb_insn_func_t)bf->func_ptr);
15360}
15361static VALUE
15362vm_invoke_builtin(rb_execution_context_t *ec, rb_control_frame_t *cfp, const struct rb_builtin_function* bf, const VALUE *argv)
15363{
15364 return invoke_bf(ec, cfp, bf, argv);
15365}
15366static VALUE
15367vm_invoke_builtin_delegate(rb_execution_context_t *ec, rb_control_frame_t *cfp, const struct rb_builtin_function *bf, unsigned int start_index)
15368{
15369 if (0) {
15370 fprintf(stderr, "vm_invoke_builtin_delegate: passing -> ");
15371 for (int i=0; i<bf->argc; i++) {
15372 fprintf(stderr, ":%s ", rb_id2name(cfp->iseq->body->local_table[i+start_index]));
15373 }
15374 fprintf(stderr, "\n");
15375 fprintf(stderr, "%s %s(%d):%p\n", __func__, bf->name, bf->argc, bf->func_ptr);
15376 }
15377 if (bf->argc == 0) {
15378 return invoke_bf(ec, cfp, bf, ((void *)0));
15379 }
15380 else {
15381 const VALUE *argv = cfp->ep - cfp->iseq->body->local_table_size - ( 3) + 1 + start_index;
15382 return invoke_bf(ec, cfp, bf, argv);
15383 }
15384}static inline
15385VALUE
15386rb_vm_lvar_exposed(rb_execution_context_t *ec, int index)
15387{
15388 const rb_control_frame_t *cfp = ec->cfp;
15389 return cfp->ep[index];
15390}
15391struct local_var_list {
15392 VALUE tbl;
15393};
15394static inline VALUE method_missing(VALUE obj, ID id, int argc, const VALUE *argv, enum method_missing_reason call_status, int kw_splat);
15395static inline VALUE vm_yield_with_cref(rb_execution_context_t *ec, int argc, const VALUE *argv, int kw_splat, const rb_cref_t *cref, int is_lambda);
15396static inline VALUE vm_yield(rb_execution_context_t *ec, int argc, const VALUE *argv, int kw_splat);
15397static inline VALUE vm_yield_with_block(rb_execution_context_t *ec, int argc, const VALUE *argv, VALUE block_handler, int kw_splat);
15398static inline VALUE vm_yield_force_blockarg(rb_execution_context_t *ec, VALUE args);
15399VALUE rb_vm_exec(rb_execution_context_t *ec, int mjit_enable_p);
15400static void vm_set_eval_stack(rb_execution_context_t * th, const rb_iseq_t *iseq, const rb_cref_t *cref, const struct rb_block *base_block);
15401static int vm_collect_local_variables_in_heap(const VALUE *dfp, const struct local_var_list *vars);
15402static VALUE rb_eUncaughtThrow;
15403static ID id_result, id_tag, id_value;
15404typedef enum call_type {
15405 CALL_PUBLIC,
15406 CALL_FCALL,
15407 CALL_VCALL,
15408 CALL_PUBLIC_KW,
15409 CALL_FCALL_KW,
15410 CALL_TYPE_MAX
15411} call_type;
15412static VALUE send_internal(int argc, const VALUE *argv, VALUE recv, call_type scope);
15413static VALUE vm_call0_body(rb_execution_context_t* ec, struct rb_calling_info *calling, struct rb_call_data *cd, const VALUE *argv);
15414static inline void
15415stack_check(rb_execution_context_t *ec)
15416{
15417 if (!(((ec)->raised_flag & (RAISED_STACKOVERFLOW)) != 0) &&
15418 rb_ec_stack_check(ec)) {
15419 ((ec)->raised_flag |= (RAISED_STACKOVERFLOW));
15420 rb_ec_stack_overflow(ec, 0);
15421 }
15422}
15423static void
15424raise_method_missing(rb_execution_context_t *ec, int argc, const VALUE *argv, VALUE obj,
15425 enum method_missing_reason last_call_status)
15426{
15427 VALUE exc = rb_eNoMethodError;
15428 VALUE format = 0;
15429 if ((__builtin_expect(!!(argc == 0), 0))) {
15430 rb_raise(rb_eArgError, "no method name given");
15431 }
15432 else if ((__builtin_expect(!!(!((((VALUE)(argv[0])&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG)||(!(((VALUE)(argv[0]) & RUBY_IMMEDIATE_MASK) || !!(((VALUE)(argv[0]) & (VALUE)~((VALUE)RUBY_Qnil)) == 0)) && (int)(((struct RBasic*)(argv[0]))->flags & RUBY_T_MASK) == (RUBY_T_SYMBOL)))), 0))) {
15433 const VALUE e = rb_eArgError;
15434 rb_raise(e, "method name must be a Symbol but %""l""i" "\v"" is given",
15435 rb_obj_class(argv[0]));
15436 }
15437 stack_check(ec);
15438 if (last_call_status & MISSING_PRIVATE) {
15439 format = rb_fstring_new(("private method `%s' called for %s%s%s"), (sizeof("private method `%s' called for %s%s%s" "") - 1));
15440 }
15441 else if (last_call_status & MISSING_PROTECTED) {
15442 format = rb_fstring_new(("protected method `%s' called for %s%s%s"), (sizeof("protected method `%s' called for %s%s%s" "") - 1));
15443 }
15444 else if (last_call_status & MISSING_VCALL) {
15445 format = rb_fstring_new(("undefined local variable or method `%s' for %s%s%s"), (sizeof("undefined local variable or method `%s' for %s%s%s" "") - 1));
15446 exc = rb_eNameError;
15447 }
15448 else if (last_call_status & MISSING_SUPER) {
15449 format = rb_fstring_new(("super: no superclass method `%s' for %s%s%s"), (sizeof("super: no superclass method `%s' for %s%s%s" "") - 1));
15450 }
15451 {
15452 exc = rb_make_no_method_exception(exc, format, obj, argc, argv,
15453 last_call_status & (MISSING_FCALL|MISSING_VCALL));
15454 if (!(last_call_status & MISSING_MISSING)) {
15455 rb_vm_pop_cfunc_frame();
15456 }
15457 rb_exc_raise(exc);
15458 }
15459}
15460static void
15461vm_raise_method_missing(rb_execution_context_t *ec, int argc, const VALUE *argv,
15462 VALUE obj, int call_status)
15463{
15464 vm_passed_block_handler_set(ec, 0);
15465 raise_method_missing(ec, argc, argv, obj, call_status | MISSING_MISSING);
15466}
15467static inline VALUE
15468method_missing(VALUE obj, ID id, int argc, const VALUE *argv, enum method_missing_reason call_status, int kw_splat)
15469{
15470 VALUE *nargv, result, work, klass;
15471 rb_execution_context_t *ec = rb_current_execution_context();
15472 VALUE block_handler = vm_passed_block_handler(ec);
15474 ec->method_missing_reason = call_status;
15475 if (id == idMethodMissing) {
15476 missing:
15477 raise_method_missing(ec, argc, argv, obj, call_status | MISSING_MISSING);
15478 }
15479 nargv = ((VALUE*)(((size_t)(argc + 1) < 1024 / sizeof(VALUE)) ? ((work) = 0, __builtin_alloca ((size_t)(argc + 1) * sizeof(VALUE))) : rb_alloc_tmp_buffer2(&(work), (long)(argc + 1), sizeof(VALUE))));
15480 nargv[0] = (rb_id2sym(id));
15481 if (!argv) {
15482 static const VALUE buf = ((VALUE)RUBY_Qfalse);
15483 ((void)0);
15484 argv = &buf;
15485 }
15486 ruby_nonempty_memcpy((nargv + 1), (argv), sizeof(VALUE)*(size_t)(argc));
15487 ++argc;
15488 argv = nargv;
15489 klass = rb_class_of((VALUE)(obj));
15490 if (!klass) goto missing;
15491 me = rb_callable_method_entry(klass, idMethodMissing);
15492 if (!me || (int) (((me)->flags & (((VALUE)RUBY_FL_USER6) )) >> ((((VALUE)RUBY_FL_USHIFT) + 4)+2))) goto missing;
15493 vm_passed_block_handler_set(ec, block_handler);
15494 result = rb_vm_call_kw(ec, obj, idMethodMissing, argc, argv, me, kw_splat);
15495 if (work) rb_free_tmp_buffer(&(work));
15496 return result;
15497}
15498static rb_control_frame_t *
15499vm_get_ruby_level_caller_cfp(const rb_execution_context_t *ec, const rb_control_frame_t *cfp)
15500{
15501 if (VM_FRAME_RUBYFRAME_P(cfp)) {
15502 return (rb_control_frame_t *)cfp;
15503 }
15504 cfp = ((cfp)+1);
15505 while (!RUBY_VM_CONTROL_FRAME_STACK_OVERFLOW_P(ec, cfp)) {
15506 if (VM_FRAME_RUBYFRAME_P(cfp)) {
15507 return (rb_control_frame_t *)cfp;
15508 }
15509 if (VM_ENV_FLAGS(cfp->ep, VM_FRAME_FLAG_PASSED) == 0) {
15510 break;
15511 }
15512 cfp = ((cfp)+1);
15513 }
15514 return 0;
15515}
15516static void
15517rb_vm_pop_cfunc_frame(void)
15518{
15519 rb_execution_context_t *ec = rb_current_execution_context();
15520 rb_control_frame_t *cfp = ec->cfp;
15521 const rb_callable_method_entry_t *me = rb_vm_frame_method_entry(cfp);
15522 do { const rb_event_flag_t flag_arg_ = (0x0040); rb_hook_list_t *hooks_arg_ = (rb_vm_global_hooks(ec)); if ((__builtin_expect(!!((hooks_arg_)->events & (flag_arg_)), 0))) { rb_exec_event_hook_orig(ec, hooks_arg_, flag_arg_, cfp->self, me->def->original_id, me->called_id, me->owner, ((VALUE)RUBY_Qnil), 0); } } while (0);
15523 do { if ((__builtin_expect(!!(0), 0))) { struct ruby_dtrace_method_hook_args args; if (rb_dtrace_setup(ec, me->owner, me->def->original_id, &args)) { do {} while (0); } } } while (0);
15524 vm_pop_frame(ec, cfp, cfp->ep);
15525}
15526static VALUE
15527vm_call_iseq_setup_normal_0start_0params_0locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd)
15528{
15529 ((void)0);
15530 return vm_call_iseq_setup_normal(ec, cfp, calling, cd->cc.me, 0, 0, 0);
15531}
15532static VALUE
15533vm_call_iseq_setup_normal_0start_0params_1locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd)
15534{
15535 ((void)0);
15536 return vm_call_iseq_setup_normal(ec, cfp, calling, cd->cc.me, 0, 0, 1);
15537}
15538static VALUE
15539vm_call_iseq_setup_normal_0start_0params_2locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd)
15540{
15541 ((void)0);
15542 return vm_call_iseq_setup_normal(ec, cfp, calling, cd->cc.me, 0, 0, 2);
15543}
15544static VALUE
15545vm_call_iseq_setup_normal_0start_0params_3locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd)
15546{
15547 ((void)0);
15548 return vm_call_iseq_setup_normal(ec, cfp, calling, cd->cc.me, 0, 0, 3);
15549}
15550static VALUE
15551vm_call_iseq_setup_normal_0start_0params_4locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd)
15552{
15553 ((void)0);
15554 return vm_call_iseq_setup_normal(ec, cfp, calling, cd->cc.me, 0, 0, 4);
15555}
15556static VALUE
15557vm_call_iseq_setup_normal_0start_0params_5locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd)
15558{
15559 ((void)0);
15560 return vm_call_iseq_setup_normal(ec, cfp, calling, cd->cc.me, 0, 0, 5);
15561}
15562static VALUE
15563vm_call_iseq_setup_normal_0start_1params_0locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd)
15564{
15565 ((void)0);
15566 return vm_call_iseq_setup_normal(ec, cfp, calling, cd->cc.me, 0, 1, 0);
15567}
15568static VALUE
15569vm_call_iseq_setup_normal_0start_1params_1locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd)
15570{
15571 ((void)0);
15572 return vm_call_iseq_setup_normal(ec, cfp, calling, cd->cc.me, 0, 1, 1);
15573}
15574static VALUE
15575vm_call_iseq_setup_normal_0start_1params_2locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd)
15576{
15577 ((void)0);
15578 return vm_call_iseq_setup_normal(ec, cfp, calling, cd->cc.me, 0, 1, 2);
15579}
15580static VALUE
15581vm_call_iseq_setup_normal_0start_1params_3locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd)
15582{
15583 ((void)0);
15584 return vm_call_iseq_setup_normal(ec, cfp, calling, cd->cc.me, 0, 1, 3);
15585}
15586static VALUE
15587vm_call_iseq_setup_normal_0start_1params_4locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd)
15588{
15589 ((void)0);
15590 return vm_call_iseq_setup_normal(ec, cfp, calling, cd->cc.me, 0, 1, 4);
15591}
15592static VALUE
15593vm_call_iseq_setup_normal_0start_1params_5locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd)
15594{
15595 ((void)0);
15596 return vm_call_iseq_setup_normal(ec, cfp, calling, cd->cc.me, 0, 1, 5);
15597}
15598static VALUE
15599vm_call_iseq_setup_normal_0start_2params_0locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd)
15600{
15601 ((void)0);
15602 return vm_call_iseq_setup_normal(ec, cfp, calling, cd->cc.me, 0, 2, 0);
15603}
15604static VALUE
15605vm_call_iseq_setup_normal_0start_2params_1locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd)
15606{
15607 ((void)0);
15608 return vm_call_iseq_setup_normal(ec, cfp, calling, cd->cc.me, 0, 2, 1);
15609}
15610static VALUE
15611vm_call_iseq_setup_normal_0start_2params_2locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd)
15612{
15613 ((void)0);
15614 return vm_call_iseq_setup_normal(ec, cfp, calling, cd->cc.me, 0, 2, 2);
15615}
15616static VALUE
15617vm_call_iseq_setup_normal_0start_2params_3locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd)
15618{
15619 ((void)0);
15620 return vm_call_iseq_setup_normal(ec, cfp, calling, cd->cc.me, 0, 2, 3);
15621}
15622static VALUE
15623vm_call_iseq_setup_normal_0start_2params_4locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd)
15624{
15625 ((void)0);
15626 return vm_call_iseq_setup_normal(ec, cfp, calling, cd->cc.me, 0, 2, 4);
15627}
15628static VALUE
15629vm_call_iseq_setup_normal_0start_2params_5locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd)
15630{
15631 ((void)0);
15632 return vm_call_iseq_setup_normal(ec, cfp, calling, cd->cc.me, 0, 2, 5);
15633}
15634static VALUE
15635vm_call_iseq_setup_normal_0start_3params_0locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd)
15636{
15637 ((void)0);
15638 return vm_call_iseq_setup_normal(ec, cfp, calling, cd->cc.me, 0, 3, 0);
15639}
15640static VALUE
15641vm_call_iseq_setup_normal_0start_3params_1locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd)
15642{
15643 ((void)0);
15644 return vm_call_iseq_setup_normal(ec, cfp, calling, cd->cc.me, 0, 3, 1);
15645}
15646static VALUE
15647vm_call_iseq_setup_normal_0start_3params_2locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd)
15648{
15649 ((void)0);
15650 return vm_call_iseq_setup_normal(ec, cfp, calling, cd->cc.me, 0, 3, 2);
15651}
15652static VALUE
15653vm_call_iseq_setup_normal_0start_3params_3locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd)
15654{
15655 ((void)0);
15656 return vm_call_iseq_setup_normal(ec, cfp, calling, cd->cc.me, 0, 3, 3);
15657}
15658static VALUE
15659vm_call_iseq_setup_normal_0start_3params_4locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd)
15660{
15661 ((void)0);
15662 return vm_call_iseq_setup_normal(ec, cfp, calling, cd->cc.me, 0, 3, 4);
15663}
15664static VALUE
15665vm_call_iseq_setup_normal_0start_3params_5locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd)
15666{
15667 ((void)0);
15668 return vm_call_iseq_setup_normal(ec, cfp, calling, cd->cc.me, 0, 3, 5);
15669}
15670static const vm_call_handler vm_call_iseq_handlers[][6] = {
15671{vm_call_iseq_setup_normal_0start_0params_0locals,
15672 vm_call_iseq_setup_normal_0start_0params_1locals,
15673 vm_call_iseq_setup_normal_0start_0params_2locals,
15674 vm_call_iseq_setup_normal_0start_0params_3locals,
15675 vm_call_iseq_setup_normal_0start_0params_4locals,
15676 vm_call_iseq_setup_normal_0start_0params_5locals},
15677{vm_call_iseq_setup_normal_0start_1params_0locals,
15678 vm_call_iseq_setup_normal_0start_1params_1locals,
15679 vm_call_iseq_setup_normal_0start_1params_2locals,
15680 vm_call_iseq_setup_normal_0start_1params_3locals,
15681 vm_call_iseq_setup_normal_0start_1params_4locals,
15682 vm_call_iseq_setup_normal_0start_1params_5locals},
15683{vm_call_iseq_setup_normal_0start_2params_0locals,
15684 vm_call_iseq_setup_normal_0start_2params_1locals,
15685 vm_call_iseq_setup_normal_0start_2params_2locals,
15686 vm_call_iseq_setup_normal_0start_2params_3locals,
15687 vm_call_iseq_setup_normal_0start_2params_4locals,
15688 vm_call_iseq_setup_normal_0start_2params_5locals},
15689{vm_call_iseq_setup_normal_0start_3params_0locals,
15690 vm_call_iseq_setup_normal_0start_3params_1locals,
15691 vm_call_iseq_setup_normal_0start_3params_2locals,
15692 vm_call_iseq_setup_normal_0start_3params_3locals,
15693 vm_call_iseq_setup_normal_0start_3params_4locals,
15694 vm_call_iseq_setup_normal_0start_3params_5locals}
15695};
15696static inline vm_call_handler
15697vm_call_iseq_setup_func(const struct rb_call_info *ci, const int param_size, const int local_size)
15698{
15699 if ((__builtin_expect(!!(ci->flag & (0x01 << VM_CALL_TAILCALL_bit)), 0))) {
15700 return &vm_call_iseq_setup_tailcall_0start;
15701 }
15702 else if (0) {
15703 return &vm_call_iseq_setup_normal_0start;
15704 }
15705 else {
15706 if (param_size <= 3 &&
15707 local_size <= 5) {
15708 ((void)0);
15709 return vm_call_iseq_handlers[param_size][local_size];
15710 }
15711 return &vm_call_iseq_setup_normal_0start;
15712 }
15713}
15714#define MJIT_HEADER 1
15715#define _FORTIFY_SOURCE 2
15716#define RUBY_EXPORT 1
15717#define CANONICALIZATION_FOR_MATHN 1
15718#define _STDC_PREDEF_H 1
15719#define __STDC_IEC_559__ 1
15720#define __STDC_IEC_559_COMPLEX__ 1
15721#define __STDC_ISO_10646__ 201706L
15722#define RUBY_INTERNAL_H 1
15723#define RUBY_H 1
15724#define HAVE_RUBY_DEFINES_H 1
15725#define HAVE_RUBY_ENCODING_H 1
15726#define HAVE_RUBY_INTERN_H 1
15727#define HAVE_RUBY_IO_H 1
15728#define HAVE_RUBY_MISSING_H 1
15729#define HAVE_RUBY_ONIGURUMA_H 1
15730#define HAVE_RUBY_RE_H 1
15731#define HAVE_RUBY_REGEX_H 1
15732#define HAVE_RUBY_RUBY_H 1
15733#define HAVE_RUBY_ST_H 1
15734#define HAVE_RUBY_THREAD_H 1
15735#define HAVE_RUBY_UTIL_H 1
15736#define HAVE_RUBY_VERSION_H 1
15737#define HAVE_RUBY_VM_H 1
15738#define RUBY_RUBY_H 1
15739#define INCLUDE_RUBY_CONFIG_H 1
15740#define STDC_HEADERS 1
15741#define HAVE_SYS_TYPES_H 1
15742#define HAVE_SYS_STAT_H 1
15743#define HAVE_STDLIB_H 1
15744#define HAVE_STRING_H 1
15745#define HAVE_MEMORY_H 1
15746#define HAVE_STRINGS_H 1
15747#define HAVE_INTTYPES_H 1
15748#define HAVE_STDINT_H 1
15749#define HAVE_UNISTD_H 1
15750#define __EXTENSIONS__ 1
15751#define _ALL_SOURCE 1
15752#define _GNU_SOURCE 1
15753#define _POSIX_PTHREAD_SEMANTICS 1
15754#define _TANDEM_SOURCE 1
15755#define RUBY_SYMBOL_EXPORT_BEGIN _Pragma("GCC visibility push(default)")
15756#define RUBY_SYMBOL_EXPORT_END _Pragma("GCC visibility pop")
15757#define HAVE_STMT_AND_DECL_IN_EXPR 1
15758#define HAVE_LIBCRYPT 1
15759#define HAVE_LIBDL 1
15760#define HAVE_DIRENT_H 1
15761#define HAVE__BOOL 1
15762#define HAVE_STDBOOL_H 1
15763#define HAVE_SYS_WAIT_H 1
15764#define HAVE_A_OUT_H 1
15765#define HAVE_GRP_H 1
15766#define HAVE_FCNTL_H 1
15767#define HAVE_FLOAT_H 1
15768#define HAVE_LANGINFO_H 1
15769#define HAVE_LIMITS_H 1
15770#define HAVE_LOCALE_H 1
15771#define HAVE_MALLOC_H 1
15772#define HAVE_PWD_H 1
15773#define HAVE_SANITIZER_ASAN_INTERFACE_H 1
15774#define HAVE_SANITIZER_MSAN_INTERFACE_H 1
15775#define HAVE_STDALIGN_H 1
15776#define HAVE_SYS_EVENTFD_H 1
15777#define HAVE_SYS_FCNTL_H 1
15778#define HAVE_SYS_FILE_H 1
15779#define HAVE_SYS_IOCTL_H 1
15780#define HAVE_SYS_PARAM_H 1
15781#define HAVE_SYS_PRCTL_H 1
15782#define HAVE_SYS_RESOURCE_H 1
15783#define HAVE_SYS_SELECT_H 1
15784#define HAVE_SYS_SENDFILE_H 1
15785#define HAVE_SYS_SOCKET_H 1
15786#define HAVE_SYS_SYSCALL_H 1
15787#define HAVE_SYS_SYSMACROS_H 1
15788#define HAVE_SYS_TIME_H 1
15789#define HAVE_SYS_TIMES_H 1
15790#define HAVE_SYS_UIO_H 1
15791#define HAVE_SYSCALL_H 1
15792#define HAVE_TIME_H 1
15793#define HAVE_UCONTEXT_H 1
15794#define HAVE_UTIME_H 1
15795#define HAVE_GMP_H 1
15796#define HAVE_LIBGMP 1
15797#define HAVE_TYPEOF 1
15798#define restrict __restrict
15799#define HAVE_LONG_LONG 1
15800#define HAVE_OFF_T 1
15801#define SIZEOF_INT 4
15802#define SIZEOF_SHORT 2
15803#define SIZEOF_LONG 8
15804#define SIZEOF_LONG_LONG 8
15805#define SIZEOF___INT64 0
15806#define SIZEOF___INT128 16
15807#define SIZEOF_OFF_T 8
15808#define SIZEOF_VOIDP 8
15809#define SIZEOF_FLOAT 4
15810#define SIZEOF_DOUBLE 8
15811#define SIZEOF_TIME_T 8
15812#define SIZEOF_CLOCK_T 8
15813#define PACKED_STRUCT(x) x __attribute__((packed))
15814#define USE_UNALIGNED_MEMBER_ACCESS 1
15815#define PRI_LL_PREFIX "ll"
15816#define HAVE_PID_T 1
15817#define rb_pid_t pid_t
15818#define SIGNEDNESS_OF_PID_T -1
15819#define PIDT2NUM(v) INT2NUM(v)
15820#define NUM2PIDT(v) NUM2INT(v)
15821#define PRI_PIDT_PREFIX PRI_INT_PREFIX
15822#define HAVE_UID_T 1
15823#define rb_uid_t uid_t
15824#define SIGNEDNESS_OF_UID_T +1
15825#define UIDT2NUM(v) UINT2NUM(v)
15826#define NUM2UIDT(v) NUM2UINT(v)
15827#define PRI_UIDT_PREFIX PRI_INT_PREFIX
15828#define HAVE_GID_T 1
15829#define rb_gid_t gid_t
15830#define SIGNEDNESS_OF_GID_T +1
15831#define GIDT2NUM(v) UINT2NUM(v)
15832#define NUM2GIDT(v) NUM2UINT(v)
15833#define PRI_GIDT_PREFIX PRI_INT_PREFIX
15834#define HAVE_TIME_T 1
15835#define rb_time_t time_t
15836#define SIGNEDNESS_OF_TIME_T -1
15837#define TIMET2NUM(v) LONG2NUM(v)
15838#define NUM2TIMET(v) NUM2LONG(v)
15839#define PRI_TIMET_PREFIX PRI_LONG_PREFIX
15840#define HAVE_DEV_T 1
15841#define rb_dev_t dev_t
15842#define SIGNEDNESS_OF_DEV_T +1
15843#define DEVT2NUM(v) ULONG2NUM(v)
15844#define NUM2DEVT(v) NUM2ULONG(v)
15845#define PRI_DEVT_PREFIX PRI_LONG_PREFIX
15846#define HAVE_MODE_T 1
15847#define rb_mode_t mode_t
15848#define SIGNEDNESS_OF_MODE_T +1
15849#define MODET2NUM(v) UINT2NUM(v)
15850#define NUM2MODET(v) NUM2UINT(v)
15851#define PRI_MODET_PREFIX PRI_INT_PREFIX
15852#define HAVE_RLIM_T 1
15853#define rb_rlim_t rlim_t
15854#define SIGNEDNESS_OF_RLIM_T +1
15855#define RLIM2NUM(v) ULONG2NUM(v)
15856#define NUM2RLIM(v) NUM2ULONG(v)
15857#define PRI_RLIM_PREFIX PRI_LONG_PREFIX
15858#define HAVE_OFF_T 1
15859#define rb_off_t off_t
15860#define SIGNEDNESS_OF_OFF_T -1
15861#define OFFT2NUM(v) LONG2NUM(v)
15862#define NUM2OFFT(v) NUM2LONG(v)
15863#define PRI_OFFT_PREFIX PRI_LONG_PREFIX
15864#define HAVE_CLOCKID_T 1
15865#define rb_clockid_t clockid_t
15866#define SIGNEDNESS_OF_CLOCKID_T -1
15867#define CLOCKID2NUM(v) INT2NUM(v)
15868#define NUM2CLOCKID(v) NUM2INT(v)
15869#define PRI_CLOCKID_PREFIX PRI_INT_PREFIX
15870#define HAVE_PROTOTYPES 1
15871#define TOKEN_PASTE(x,y) x ##y
15872#define STRINGIZE(expr) STRINGIZE0(expr)
15873#define HAVE_STDARG_PROTOTYPES 1
15874#define HAVE_VA_ARGS_MACRO 1
15875#define RUBY_ALIGNAS(x) __attribute__((__aligned__(x)))
15876#define RUBY_ALIGNOF alignof
15877#define CONSTFUNC(x) __attribute__ ((__const__)) x
15878#define PUREFUNC(x) __attribute__ ((__pure__)) x
15879#define NORETURN(x) __attribute__ ((__noreturn__)) x
15880#define DEPRECATED(x) __attribute__ ((__deprecated__)) x
15881#define DEPRECATED_BY(n,x) __attribute__ ((__deprecated__("by "#n))) x
15882#define DEPRECATED_TYPE(mesg,x) __attribute__ ((__deprecated__ mesg)) x
15883#define NOINLINE(x) __attribute__ ((__noinline__)) x
15884#define NO_SANITIZE(san,x) __attribute__ ((__no_sanitize__(san))) x
15885#define NO_SANITIZE_ADDRESS(x) __attribute__ ((__no_sanitize_address__)) x
15886#define NO_ADDRESS_SAFETY_ANALYSIS(x) __attribute__ ((__no_address_safety_analysis__)) x
15887#define WARN_UNUSED_RESULT(x) __attribute__ ((__warn_unused_result__)) x
15888#define MAYBE_UNUSED(x) __attribute__ ((__unused__)) x
15889#define ERRORFUNC(mesg,x) __attribute__ ((__error__ mesg)) x
15890#define WARNINGFUNC(mesg,x) __attribute__ ((__warning__ mesg)) x
15891#define WEAK(x) __attribute__ ((__weak__)) x
15892#define HAVE_FUNC_WEAK 1
15893#define RUBY_CXX_DEPRECATED(msg) __attribute__((__deprecated__(msg)))
15894#define FUNC_UNOPTIMIZED(x) __attribute__ ((__optimize__("O0"))) x
15895#define FUNC_MINIMIZED(x) __attribute__ ((__optimize__("-Os","-fomit-frame-pointer"))) x
15896#define HAVE_ATTRIBUTE_FUNCTION_ALIAS 1
15897#define RUBY_ALIAS_FUNCTION_TYPE(type,prot,name,args) type prot __attribute__((alias(#name)));
15898#define RUBY_ALIAS_FUNCTION_VOID(prot,name,args) RUBY_ALIAS_FUNCTION_TYPE(void, prot, name, args)
15899#define HAVE_GCC_ATOMIC_BUILTINS 1
15900#define HAVE_GCC_SYNC_BUILTINS 1
15901#define UNREACHABLE __builtin_unreachable()
15902#define RUBY_FUNC_EXPORTED __attribute__ ((__visibility__("default"))) extern
15903#define RUBY_FUNC_NONNULL(n,x) __attribute__ ((__nonnull__(n))) x
15904#define RUBY_FUNCTION_NAME_STRING __func__
15905#define ENUM_OVER_INT 1
15906#define HAVE_DECL_SYS_NERR 1
15907#define HAVE_DECL_GETENV 1
15908#define SIZEOF_SIZE_T 8
15909#define SIZEOF_PTRDIFF_T 8
15910#define PRI_SIZE_PREFIX "z"
15911#define PRI_PTRDIFF_PREFIX "t"
15912#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
15913#define HAVE_ST_BLKSIZE 1
15914#define HAVE_STRUCT_STAT_ST_BLOCKS 1
15915#define HAVE_ST_BLOCKS 1
15916#define HAVE_STRUCT_STAT_ST_RDEV 1
15917#define HAVE_ST_RDEV 1
15918#define SIZEOF_STRUCT_STAT_ST_SIZE SIZEOF_OFF_T
15919#define SIZEOF_STRUCT_STAT_ST_BLOCKS SIZEOF_OFF_T
15920#define SIZEOF_STRUCT_STAT_ST_INO SIZEOF_LONG
15921#define HAVE_STRUCT_STAT_ST_ATIM 1
15922#define HAVE_STRUCT_STAT_ST_MTIM 1
15923#define HAVE_STRUCT_STAT_ST_CTIM 1
15924#define HAVE_STRUCT_STATX_STX_BTIME 1
15925#define HAVE_STRUCT_TIMEVAL 1
15926#define SIZEOF_STRUCT_TIMEVAL_TV_SEC SIZEOF_TIME_T
15927#define HAVE_STRUCT_TIMESPEC 1
15928#define HAVE_STRUCT_TIMEZONE 1
15929#define HAVE_RB_FD_INIT 1
15930#define HAVE_INT8_T 1
15931#define SIZEOF_INT8_T 1
15932#define HAVE_UINT8_T 1
15933#define SIZEOF_UINT8_T 1
15934#define HAVE_INT16_T 1
15935#define SIZEOF_INT16_T 2
15936#define HAVE_UINT16_T 1
15937#define SIZEOF_UINT16_T 2
15938#define HAVE_INT32_T 1
15939#define SIZEOF_INT32_T 4
15940#define HAVE_UINT32_T 1
15941#define SIZEOF_UINT32_T 4
15942#define HAVE_INT64_T 1
15943#define SIZEOF_INT64_T 8
15944#define HAVE_UINT64_T 1
15945#define SIZEOF_UINT64_T 8
15946#define HAVE_INT128_T 1
15947#define int128_t __int128
15948#define SIZEOF_INT128_T SIZEOF___INT128
15949#define HAVE_UINT128_T 1
15950#define uint128_t unsigned __int128
15951#define SIZEOF_UINT128_T SIZEOF___INT128
15952#define HAVE_INTPTR_T 1
15953#define SIZEOF_INTPTR_T 8
15954#define HAVE_UINTPTR_T 1
15955#define SIZEOF_UINTPTR_T 8
15956#define HAVE_SSIZE_T 1
15957#define SIZEOF_SSIZE_T 8
15958#define STACK_END_ADDRESS __libc_stack_end
15959#define GETGROUPS_T gid_t
15960#define RETSIGTYPE void
15961#define HAVE_ALLOCA_H 1
15962#define HAVE_ALLOCA 1
15963#define HAVE_ACOSH 1
15964#define HAVE_CBRT 1
15965#define HAVE_CRYPT 1
15966#define HAVE_DUP2 1
15967#define HAVE_ERF 1
15968#define HAVE_EXPLICIT_BZERO 1
15969#define HAVE_FFS 1
15970#define HAVE_FLOCK 1
15971#define HAVE_HYPOT 1
15972#define HAVE_LGAMMA_R 1
15973#define HAVE_MEMMOVE 1
15974#define HAVE_NAN 1
15975#define HAVE_NEXTAFTER 1
15976#define HAVE_STRCHR 1
15977#define HAVE_STRERROR 1
15978#define HAVE_STRSTR 1
15979#define HAVE_TGAMMA 1
15980#define HAVE_FINITE 1
15981#define HAVE_ISINF 1
15982#define HAVE_ISNAN 1
15983#define SPT_TYPE SPT_REUSEARGV
15984#define HAVE_SIGNBIT 1
15985#define HAVE_FORK 1
15986#define HAVE_VFORK 1
15987#define HAVE_WORKING_VFORK 1
15988#define HAVE_WORKING_FORK 1
15989#define HAVE__LONGJMP 1
15990#define HAVE_ATAN2L 1
15991#define HAVE_ATAN2F 1
15992#define HAVE_CHROOT 1
15993#define HAVE_CLOCK_GETTIME 1
15994#define HAVE_COPY_FILE_RANGE 1
15995#define HAVE_COSH 1
15996#define HAVE_CRYPT_R 1
15997#define HAVE_DIRFD 1
15998#define HAVE_DL_ITERATE_PHDR 1
15999#define HAVE_DLOPEN 1
16000#define HAVE_DLADDR 1
16001#define HAVE_DUP 1
16002#define HAVE_DUP3 1
16003#define HAVE_EACCESS 1
16004#define HAVE_ENDGRENT 1
16005#define HAVE_EVENTFD 1
16006#define HAVE_FCHMOD 1
16007#define HAVE_FCHOWN 1
16008#define HAVE_FCNTL 1
16009#define HAVE_FDATASYNC 1
16010#define HAVE_FDOPENDIR 1
16011#define HAVE_FMOD 1
16012#define HAVE_FSTATAT 1
16013#define HAVE_FSYNC 1
16014#define HAVE_FTRUNCATE 1
16015#define HAVE_FTRUNCATE64 1
16016#define HAVE_GETCWD 1
16017#define HAVE_GETGRNAM 1
16018#define HAVE_GETGRNAM_R 1
16019#define HAVE_GETGROUPS 1
16020#define HAVE_GETPGID 1
16021#define HAVE_GETPGRP 1
16022#define HAVE_GETPRIORITY 1
16023#define HAVE_GETPWNAM_R 1
16024#define HAVE_GETRANDOM 1
16025#define HAVE_GETRESGID 1
16026#define HAVE_GETRESUID 1
16027#define HAVE_GETRLIMIT 1
16028#define HAVE_GETSID 1
16029#define HAVE_GETTIMEOFDAY 1
16030#define HAVE_GMTIME_R 1
16031#define HAVE_GRANTPT 1
16032#define HAVE_INITGROUPS 1
16033#define HAVE_IOCTL 1
16034#define HAVE_KILLPG 1
16035#define HAVE_LCHOWN 1
16036#define HAVE_LINK 1
16037#define HAVE_LLABS 1
16038#define HAVE_LOCKF 1
16039#define HAVE_LOG2 1
16040#define HAVE_LSTAT 1
16041#define HAVE_LUTIMES 1
16042#define HAVE_MALLOC_USABLE_SIZE 1
16043#define HAVE_MBLEN 1
16044#define HAVE_MEMALIGN 1
16045#define HAVE_WRITEV 1
16046#define HAVE_MEMRCHR 1
16047#define HAVE_MEMMEM 1
16048#define HAVE_MKFIFO 1
16049#define HAVE_MKNOD 1
16050#define HAVE_MKTIME 1
16051#define HAVE_OPENAT 1
16052#define HAVE_PIPE2 1
16053#define HAVE_POLL 1
16054#define HAVE_POSIX_FADVISE 1
16055#define HAVE_POSIX_MEMALIGN 1
16056#define HAVE_PPOLL 1
16057#define HAVE_PREAD 1
16058#define HAVE_PWRITE 1
16059#define HAVE_QSORT_R 1
16060#define HAVE_READLINK 1
16061#define HAVE_REALPATH 1
16062#define HAVE_ROUND 1
16063#define HAVE_SCHED_GETAFFINITY 1
16064#define HAVE_SEEKDIR 1
16065#define HAVE_SENDFILE 1
16066#define HAVE_SETEGID 1
16067#define HAVE_SETENV 1
16068#define HAVE_SETEUID 1
16069#define HAVE_SETGID 1
16070#define HAVE_SETGROUPS 1
16071#define HAVE_SETPGID 1
16072#define HAVE_SETPGRP 1
16073#define HAVE_SETREGID 1
16074#define HAVE_SETRESGID 1
16075#define HAVE_SETRESUID 1
16076#define HAVE_SETREUID 1
16077#define HAVE_SETRLIMIT 1
16078#define HAVE_SETSID 1
16079#define HAVE_SETUID 1
16080#define HAVE_SHUTDOWN 1
16081#define HAVE_SIGACTION 1
16082#define HAVE_SIGALTSTACK 1
16083#define HAVE_SIGPROCMASK 1
16084#define HAVE_SINH 1
16085#define HAVE_SYMLINK 1
16086#define HAVE_SYSCALL 1
16087#define HAVE_SYSCONF 1
16088#define HAVE_TANH 1
16089#define HAVE_TELLDIR 1
16090#define HAVE_TIMEGM 1
16091#define HAVE_TIMES 1
16092#define HAVE_TRUNCATE 1
16093#define HAVE_TRUNCATE64 1
16094#define HAVE_UNSETENV 1
16095#define HAVE_UTIMENSAT 1
16096#define HAVE_UTIMES 1
16097#define HAVE_WAIT4 1
16098#define HAVE_WAITPID 1
16099#define HAVE_STATX 1
16100#define HAVE_CRYPT_H 1
16101#define HAVE_STRUCT_CRYPT_DATA_INITIALIZED 1
16102#define HAVE_BUILTIN___BUILTIN_ALLOCA_WITH_ALIGN 1
16103#define HAVE_BUILTIN___BUILTIN_ASSUME_ALIGNED 1
16104#define HAVE_BUILTIN___BUILTIN_BSWAP16 1
16105#define HAVE_BUILTIN___BUILTIN_BSWAP32 1
16106#define HAVE_BUILTIN___BUILTIN_BSWAP64 1
16107#define HAVE_BUILTIN___BUILTIN_POPCOUNT 1
16108#define HAVE_BUILTIN___BUILTIN_POPCOUNTLL 1
16109#define HAVE_BUILTIN___BUILTIN_CLZ 1
16110#define HAVE_BUILTIN___BUILTIN_CLZL 1
16111#define HAVE_BUILTIN___BUILTIN_CLZLL 1
16112#define HAVE_BUILTIN___BUILTIN_CTZ 1
16113#define HAVE_BUILTIN___BUILTIN_CTZLL 1
16114#define HAVE_BUILTIN___BUILTIN_ADD_OVERFLOW 1
16115#define HAVE_BUILTIN___BUILTIN_SUB_OVERFLOW 1
16116#define HAVE_BUILTIN___BUILTIN_MUL_OVERFLOW 1
16117#define HAVE_BUILTIN___BUILTIN_MUL_OVERFLOW_P 1
16118#define HAVE_BUILTIN___BUILTIN_CONSTANT_P 1
16119#define HAVE_BUILTIN___BUILTIN_CHOOSE_EXPR 1
16120#define HAVE_BUILTIN___BUILTIN_CHOOSE_EXPR_CONSTANT_P 1
16121#define HAVE_BUILTIN___BUILTIN_TYPES_COMPATIBLE_P 1
16122#define HAVE_BUILTIN___BUILTIN_TRAP 1
16123#define HAVE_GNU_QSORT_R 1
16124#define ATAN2_INF_C99 1
16125#define HAVE_CLOCK_GETRES 1
16126#define HAVE_LIBRT 1
16127#define HAVE_LIBRT 1
16128#define HAVE_TIMER_CREATE 1
16129#define HAVE_TIMER_SETTIME 1
16130#define HAVE_STRUCT_TM_TM_ZONE 1
16131#define HAVE_TM_ZONE 1
16132#define HAVE_STRUCT_TM_TM_GMTOFF 1
16133#define HAVE_DAYLIGHT 1
16134#define NEGATIVE_TIME_T 1
16135#define POSIX_SIGNAL 1
16136#define HAVE_SIG_T 1
16137#define RSHIFT(x,y) ((x)>>(int)(y))
16138#define HAVE__SC_CLK_TCK 1
16139#define STACK_GROW_DIRECTION -1
16140#define COROUTINE_H "coroutine/amd64/Context.h"
16141#define _REENTRANT 1
16142#define _THREAD_SAFE 1
16143#define HAVE_LIBPTHREAD 1
16144#define HAVE_SCHED_YIELD 1
16145#define HAVE_PTHREAD_ATTR_SETINHERITSCHED 1
16146#define HAVE_PTHREAD_ATTR_GETSTACK 1
16147#define HAVE_PTHREAD_ATTR_GETGUARDSIZE 1
16148#define HAVE_PTHREAD_CONDATTR_SETCLOCK 1
16149#define HAVE_PTHREAD_SIGMASK 1
16150#define HAVE_PTHREAD_SETNAME_NP 1
16151#define HAVE_PTHREAD_GETATTR_NP 1
16152#define SET_CURRENT_THREAD_NAME(name) pthread_setname_np(pthread_self(), name)
16153#define SET_ANOTHER_THREAD_NAME(thid,name) pthread_setname_np(thid, name)
16154#define DEFINE_MCONTEXT_PTR(mc,uc) mcontext_t *mc = &(uc)->uc_mcontext
16155#define HAVE_GETCONTEXT 1
16156#define HAVE_SETCONTEXT 1
16157#define USE_ELF 1
16158#define HAVE_ELF_H 1
16159#define HAVE_LIBZ 1
16160#define HAVE_BACKTRACE 1
16161#define HAVE_VALGRIND_MEMCHECK_H 1
16162#define DLEXT_MAXLEN 3
16163#define DLEXT ".so"
16164#define HAVE__SETJMP 1
16165#define RUBY_SETJMP(env) __builtin_setjmp((env))
16166#define RUBY_LONGJMP(env,val) __builtin_longjmp((env),val)
16167#define USE_MJIT 1
16168#define HAVE_PTHREAD_H 1
16169#define RUBY_PLATFORM "x86_64-linux"
16170#define RUBY_DEFINES_H 1
16171#define HAVE_ATTRIBUTE_ERRORFUNC 1
16172#define HAVE_ATTRIBUTE_WARNINGFUNC 1
16173#define GCC_VERSION_SINCE(major,minor,patchlevel) ((__GNUC__ > (major)) || ((__GNUC__ == (major) && ((__GNUC_MINOR__ > (minor)) || (__GNUC_MINOR__ == (minor) && __GNUC_PATCHLEVEL__ >= (patchlevel))))))
16174#define GCC_VERSION_BEFORE(major,minor,patchlevel) ((__GNUC__ < (major)) || ((__GNUC__ == (major) && ((__GNUC_MINOR__ < (minor)) || (__GNUC_MINOR__ == (minor) && __GNUC_PATCHLEVEL__ <= (patchlevel))))))
16175#define RB_LIKELY(x) (__builtin_expect(!!(x), 1))
16176#define RB_UNLIKELY(x) (__builtin_expect(!!(x), 0))
16177#define COLDFUNC __attribute__((cold))
16178#define PRINTF_ARGS(decl,string_index,first_to_check) decl __attribute__((format(printf, string_index, first_to_check)))
16179#define RB_GNUC_EXTENSION __extension__
16180#define RB_GNUC_EXTENSION_BLOCK(x) __extension__ ({ x; })
16181#define _STDIO_H 1
16182#define __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION
16183#undef __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION
16184#define _FEATURES_H 1
16185#undef __USE_ISOC11
16186#undef __USE_ISOC99
16187#undef __USE_ISOC95
16188#undef __USE_ISOCXX11
16189#undef __USE_POSIX
16190#undef __USE_POSIX2
16191#undef __USE_POSIX199309
16192#undef __USE_POSIX199506
16193#undef __USE_XOPEN
16194#undef __USE_XOPEN_EXTENDED
16195#undef __USE_UNIX98
16196#undef __USE_XOPEN2K
16197#undef __USE_XOPEN2KXSI
16198#undef __USE_XOPEN2K8
16199#undef __USE_XOPEN2K8XSI
16200#undef __USE_LARGEFILE
16201#undef __USE_LARGEFILE64
16202#undef __USE_FILE_OFFSET64
16203#undef __USE_MISC
16204#undef __USE_ATFILE
16205#undef __USE_GNU
16206#undef __USE_FORTIFY_LEVEL
16207#undef __KERNEL_STRICT_NAMES
16208#undef __GLIBC_USE_DEPRECATED_GETS
16209#undef __GLIBC_USE_DEPRECATED_SCANF
16210#define __KERNEL_STRICT_NAMES
16211#define __GNUC_PREREQ(maj,min) ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
16212#define __glibc_clang_prereq(maj,min) 0
16213#define __GLIBC_USE(F) __GLIBC_USE_ ## F
16214#undef _ISOC95_SOURCE
16215#define _ISOC95_SOURCE 1
16216#undef _ISOC99_SOURCE
16217#define _ISOC99_SOURCE 1
16218#undef _ISOC11_SOURCE
16219#define _ISOC11_SOURCE 1
16220#undef _POSIX_SOURCE
16221#define _POSIX_SOURCE 1
16222#undef _POSIX_C_SOURCE
16223#define _POSIX_C_SOURCE 200809L
16224#undef _XOPEN_SOURCE
16225#define _XOPEN_SOURCE 700
16226#undef _XOPEN_SOURCE_EXTENDED
16227#define _XOPEN_SOURCE_EXTENDED 1
16228#undef _LARGEFILE64_SOURCE
16229#define _LARGEFILE64_SOURCE 1
16230#undef _DEFAULT_SOURCE
16231#define _DEFAULT_SOURCE 1
16232#undef _ATFILE_SOURCE
16233#define _ATFILE_SOURCE 1
16234#undef _DEFAULT_SOURCE
16235#define _DEFAULT_SOURCE 1
16236#define __USE_ISOC11 1
16237#define __USE_ISOC99 1
16238#define __USE_ISOC95 1
16239#undef _POSIX_SOURCE
16240#define _POSIX_SOURCE 1
16241#undef _POSIX_C_SOURCE
16242#define _POSIX_C_SOURCE 200809L
16243#define __USE_POSIX 1
16244#define __USE_POSIX2 1
16245#define __USE_POSIX199309 1
16246#define __USE_POSIX199506 1
16247#define __USE_XOPEN2K 1
16248#undef __USE_ISOC95
16249#define __USE_ISOC95 1
16250#undef __USE_ISOC99
16251#define __USE_ISOC99 1
16252#define __USE_XOPEN2K8 1
16253#undef _ATFILE_SOURCE
16254#define _ATFILE_SOURCE 1
16255#define __USE_XOPEN 1
16256#define __USE_XOPEN_EXTENDED 1
16257#define __USE_UNIX98 1
16258#undef _LARGEFILE_SOURCE
16259#define _LARGEFILE_SOURCE 1
16260#define __USE_XOPEN2K8 1
16261#define __USE_XOPEN2K8XSI 1
16262#define __USE_XOPEN2K 1
16263#define __USE_XOPEN2KXSI 1
16264#undef __USE_ISOC95
16265#define __USE_ISOC95 1
16266#undef __USE_ISOC99
16267#define __USE_ISOC99 1
16268#define __USE_LARGEFILE 1
16269#define __USE_LARGEFILE64 1
16270#define __USE_MISC 1
16271#define __USE_ATFILE 1
16272#define __USE_GNU 1
16273#define __USE_FORTIFY_LEVEL 2
16274#define __GLIBC_USE_DEPRECATED_GETS 0
16275#define __GLIBC_USE_DEPRECATED_SCANF 0
16276#undef __GNU_LIBRARY__
16277#define __GNU_LIBRARY__ 6
16278#define __GLIBC__ 2
16279#define __GLIBC_MINOR__ 30
16280#define __GLIBC_PREREQ(maj,min) ((__GLIBC__ << 16) + __GLIBC_MINOR__ >= ((maj) << 16) + (min))
16281#define _SYS_CDEFS_H 1
16282#undef __P
16283#undef __PMT
16284#define __LEAF , __leaf__
16285#define __LEAF_ATTR __attribute__ ((__leaf__))
16286#define __THROW __attribute__ ((__nothrow__ __LEAF))
16287#define __THROWNL __attribute__ ((__nothrow__))
16288#define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct
16289#define __NTHNL(fct) __attribute__ ((__nothrow__)) fct
16290#define __glibc_clang_has_extension(ext) 0
16291#define __P(args) args
16292#define __PMT(args) args
16293#define __CONCAT(x,y) x ## y
16294#define __STRING(x) #x
16295#define __ptr_t void *
16296#define __BEGIN_DECLS
16297#define __END_DECLS
16298#define __bos(ptr) __builtin_object_size (ptr, __USE_FORTIFY_LEVEL > 1)
16299#define __bos0(ptr) __builtin_object_size (ptr, 0)
16300#define __warndecl(name,msg) extern void name (void) __attribute__((__warning__ (msg)))
16301#define __warnattr(msg) __attribute__((__warning__ (msg)))
16302#define __errordecl(name,msg) extern void name (void) __attribute__((__error__ (msg)))
16303#define __flexarr []
16304#define __glibc_c99_flexarr_available 1
16305#define __REDIRECT(name,proto,alias) name proto __asm__ (__ASMNAME (#alias))
16306#define __REDIRECT_NTH(name,proto,alias) name proto __asm__ (__ASMNAME (#alias)) __THROW
16307#define __REDIRECT_NTHNL(name,proto,alias) name proto __asm__ (__ASMNAME (#alias)) __THROWNL
16308#define __ASMNAME(cname) __ASMNAME2 (__USER_LABEL_PREFIX__, cname)
16309#define __ASMNAME2(prefix,cname) __STRING (prefix) cname
16310#define __attribute_malloc__ __attribute__ ((__malloc__))
16311#define __attribute_alloc_size__(params) __attribute__ ((__alloc_size__ params))
16312#define __attribute_pure__ __attribute__ ((__pure__))
16313#define __attribute_const__ __attribute__ ((__const__))
16314#define __attribute_used__ __attribute__ ((__used__))
16315#define __attribute_noinline__ __attribute__ ((__noinline__))
16316#define __attribute_deprecated__ __attribute__ ((__deprecated__))
16317#define __attribute_deprecated_msg__(msg) __attribute__ ((__deprecated__ (msg)))
16318#define __attribute_format_arg__(x) __attribute__ ((__format_arg__ (x)))
16319#define __attribute_format_strfmon__(a,b) __attribute__ ((__format__ (__strfmon__, a, b)))
16320#define __nonnull(params) __attribute__ ((__nonnull__ params))
16321#define __attribute_warn_unused_result__ __attribute__ ((__warn_unused_result__))
16322#define __wur __attribute_warn_unused_result__
16323#undef __always_inline
16324#define __always_inline __inline __attribute__ ((__always_inline__))
16325#define __attribute_artificial__ __attribute__ ((__artificial__))
16326#define __extern_inline extern __inline __attribute__ ((__gnu_inline__))
16327#define __extern_always_inline extern __always_inline __attribute__ ((__gnu_inline__))
16328#define __fortify_function __extern_always_inline __attribute_artificial__
16329#define __va_arg_pack() __builtin_va_arg_pack ()
16330#define __va_arg_pack_len() __builtin_va_arg_pack_len ()
16331#define __restrict_arr __restrict
16332#define __glibc_unlikely(cond) __builtin_expect ((cond), 0)
16333#define __glibc_likely(cond) __builtin_expect ((cond), 1)
16334#define __glibc_has_attribute(attr) __has_attribute (attr)
16335#define __glibc_has_include __has_include
16336#define __attribute_nonstring__ __attribute__ ((__nonstring__))
16337#undef __attribute_copy__
16338#define __attribute_copy__(arg) __attribute__ ((__copy__ (arg)))
16339#define __WORDSIZE 64
16340#define __WORDSIZE_TIME64_COMPAT32 1
16341#define __SYSCALL_WORDSIZE 64
16342#define __LDBL_REDIR1(name,proto,alias) name proto
16343#define __LDBL_REDIR(name,proto) name proto
16344#define __LDBL_REDIR1_NTH(name,proto,alias) name proto __THROW
16345#define __LDBL_REDIR_NTH(name,proto) name proto __THROW
16346#define __LDBL_REDIR_DECL(name)
16347#define __REDIRECT_LDBL(name,proto,alias) __REDIRECT (name, proto, alias)
16348#define __REDIRECT_NTH_LDBL(name,proto,alias) __REDIRECT_NTH (name, proto, alias)
16349#define __glibc_macro_warning1(message) _Pragma (#message)
16350#define __glibc_macro_warning(message) __glibc_macro_warning1 (GCC warning message)
16351#define __HAVE_GENERIC_SELECTION 1
16352#define __USE_EXTERN_INLINES 1
16353#define __stub___compat_bdflush
16354#define __stub_chflags
16355#define __stub_fchflags
16356#define __stub_gtty
16357#define __stub_lchmod
16358#define __stub_revoke
16359#define __stub_setlogin
16360#define __stub_sigreturn
16361#define __stub_sstk
16362#define __stub_stty
16363#undef __GLIBC_USE_LIB_EXT2
16364#define __GLIBC_USE_LIB_EXT2 1
16365#undef __GLIBC_USE_IEC_60559_BFP_EXT
16366#define __GLIBC_USE_IEC_60559_BFP_EXT 1
16367#undef __GLIBC_USE_IEC_60559_FUNCS_EXT
16368#define __GLIBC_USE_IEC_60559_FUNCS_EXT 1
16369#undef __GLIBC_USE_IEC_60559_TYPES_EXT
16370#define __GLIBC_USE_IEC_60559_TYPES_EXT 1
16371#define __need_size_t
16372#define __need_NULL
16373#define __size_t__
16374#define __SIZE_T__
16375#define _SIZE_T
16376#define _SYS_SIZE_T_H
16377#define _T_SIZE_
16378#define _T_SIZE
16379#define __SIZE_T
16380#define _SIZE_T_
16381#define _BSD_SIZE_T_
16382#define _SIZE_T_DEFINED_
16383#define _SIZE_T_DEFINED
16384#define _BSD_SIZE_T_DEFINED_
16385#define _SIZE_T_DECLARED
16386#define ___int_size_t_h
16387#define _GCC_SIZE_T
16388#define _SIZET_
16389#define __size_t
16390#undef __need_size_t
16391#undef NULL
16392#define NULL ((void *)0)
16393#undef __need_NULL
16394#define __need___va_list
16395#undef __need___va_list
16396#define __GNUC_VA_LIST
16397#define _BITS_TYPES_H 1
16398#define __WORDSIZE 64
16399#define __WORDSIZE_TIME64_COMPAT32 1
16400#define __SYSCALL_WORDSIZE 64
16401#define __TIMESIZE __WORDSIZE
16402#define __S16_TYPE short int
16403#define __U16_TYPE unsigned short int
16404#define __S32_TYPE int
16405#define __U32_TYPE unsigned int
16406#define __SLONGWORD_TYPE long int
16407#define __ULONGWORD_TYPE unsigned long int
16408#define __SQUAD_TYPE long int
16409#define __UQUAD_TYPE unsigned long int
16410#define __SWORD_TYPE long int
16411#define __UWORD_TYPE unsigned long int
16412#define __SLONG32_TYPE int
16413#define __ULONG32_TYPE unsigned int
16414#define __S64_TYPE long int
16415#define __U64_TYPE unsigned long int
16416#define __STD_TYPE typedef
16417#define _BITS_TYPESIZES_H 1
16418#define __SYSCALL_SLONG_TYPE __SLONGWORD_TYPE
16419#define __SYSCALL_ULONG_TYPE __ULONGWORD_TYPE
16420#define __DEV_T_TYPE __UQUAD_TYPE
16421#define __UID_T_TYPE __U32_TYPE
16422#define __GID_T_TYPE __U32_TYPE
16423#define __INO_T_TYPE __SYSCALL_ULONG_TYPE
16424#define __INO64_T_TYPE __UQUAD_TYPE
16425#define __MODE_T_TYPE __U32_TYPE
16426#define __NLINK_T_TYPE __SYSCALL_ULONG_TYPE
16427#define __FSWORD_T_TYPE __SYSCALL_SLONG_TYPE
16428#define __OFF_T_TYPE __SYSCALL_SLONG_TYPE
16429#define __OFF64_T_TYPE __SQUAD_TYPE
16430#define __PID_T_TYPE __S32_TYPE
16431#define __RLIM_T_TYPE __SYSCALL_ULONG_TYPE
16432#define __RLIM64_T_TYPE __UQUAD_TYPE
16433#define __BLKCNT_T_TYPE __SYSCALL_SLONG_TYPE
16434#define __BLKCNT64_T_TYPE __SQUAD_TYPE
16435#define __FSBLKCNT_T_TYPE __SYSCALL_ULONG_TYPE
16436#define __FSBLKCNT64_T_TYPE __UQUAD_TYPE
16437#define __FSFILCNT_T_TYPE __SYSCALL_ULONG_TYPE
16438#define __FSFILCNT64_T_TYPE __UQUAD_TYPE
16439#define __ID_T_TYPE __U32_TYPE
16440#define __CLOCK_T_TYPE __SYSCALL_SLONG_TYPE
16441#define __TIME_T_TYPE __SYSCALL_SLONG_TYPE
16442#define __USECONDS_T_TYPE __U32_TYPE
16443#define __SUSECONDS_T_TYPE __SYSCALL_SLONG_TYPE
16444#define __DADDR_T_TYPE __S32_TYPE
16445#define __KEY_T_TYPE __S32_TYPE
16446#define __CLOCKID_T_TYPE __S32_TYPE
16447#define __TIMER_T_TYPE void *
16448#define __BLKSIZE_T_TYPE __SYSCALL_SLONG_TYPE
16449#define __FSID_T_TYPE struct { int __val[2]; }
16450#define __SSIZE_T_TYPE __SWORD_TYPE
16451#define __CPU_MASK_TYPE __SYSCALL_ULONG_TYPE
16452#define __OFF_T_MATCHES_OFF64_T 1
16453#define __INO_T_MATCHES_INO64_T 1
16454#define __RLIM_T_MATCHES_RLIM64_T 1
16455#define __FD_SETSIZE 1024
16456#define _BITS_TIME64_H 1
16457#define __TIME64_T_TYPE __TIME_T_TYPE
16458#undef __STD_TYPE
16459#define _____fpos_t_defined 1
16460#define ____mbstate_t_defined 1
16461#define _____fpos64_t_defined 1
16462#define ____FILE_defined 1
16463#define __FILE_defined 1
16464#define __struct_FILE_defined 1
16465#define __getc_unlocked_body(_fp) (__glibc_unlikely ((_fp)->_IO_read_ptr >= (_fp)->_IO_read_end) ? __uflow (_fp) : *(unsigned char *) (_fp)->_IO_read_ptr++)
16466#define __putc_unlocked_body(_ch,_fp) (__glibc_unlikely ((_fp)->_IO_write_ptr >= (_fp)->_IO_write_end) ? __overflow (_fp, (unsigned char) (_ch)) : (unsigned char) (*(_fp)->_IO_write_ptr++ = (_ch)))
16467#define _IO_EOF_SEEN 0x0010
16468#define __feof_unlocked_body(_fp) (((_fp)->_flags & _IO_EOF_SEEN) != 0)
16469#define _IO_ERR_SEEN 0x0020
16470#define __ferror_unlocked_body(_fp) (((_fp)->_flags & _IO_ERR_SEEN) != 0)
16471#define _IO_USER_LOCK 0x8000
16472#define __cookie_io_functions_t_defined 1
16473#define _VA_LIST_DEFINED
16474#define __off_t_defined
16475#define __off64_t_defined
16476#define __ssize_t_defined
16477#define _IOFBF 0
16478#define _IOLBF 1
16479#define _IONBF 2
16480#define BUFSIZ 8192
16481#define EOF (-1)
16482#define SEEK_SET 0
16483#define SEEK_CUR 1
16484#define SEEK_END 2
16485#define SEEK_DATA 3
16486#define SEEK_HOLE 4
16487#define P_tmpdir "/tmp"
16488#define _BITS_STDIO_LIM_H 1
16489#define L_tmpnam 20
16490#define TMP_MAX 238328
16491#define FILENAME_MAX 4096
16492#define L_ctermid 9
16493#define L_cuserid 9
16494#undef FOPEN_MAX
16495#define FOPEN_MAX 16
16496#define stdin stdin
16497#define stdout stdout
16498#define stderr stderr
16499#define RENAME_NOREPLACE (1 << 0)
16500#define RENAME_EXCHANGE (1 << 1)
16501#define RENAME_WHITEOUT (1 << 2)
16502#define _BITS_STDIO_H 1
16503#define __STDIO_INLINE __extern_inline
16504#define fread_unlocked(ptr,size,n,stream) (__extension__ ((__builtin_constant_p (size) && __builtin_constant_p (n) && (size_t) (size) * (size_t) (n) <= 8 && (size_t) (size) != 0) ? ({ char *__ptr = (char *) (ptr); FILE *__stream = (stream); size_t __cnt; for (__cnt = (size_t) (size) * (size_t) (n); __cnt > 0; --__cnt) { int __c = getc_unlocked (__stream); if (__c == EOF) break; *__ptr++ = __c; } ((size_t) (size) * (size_t) (n) - __cnt) / (size_t) (size); }) : (((__builtin_constant_p (size) && (size_t) (size) == 0) || (__builtin_constant_p (n) && (size_t) (n) == 0)) ? ((void) (ptr), (void) (stream), (void) (size), (void) (n), (size_t) 0) : fread_unlocked (ptr, size, n, stream))))
16505#define fwrite_unlocked(ptr,size,n,stream) (__extension__ ((__builtin_constant_p (size) && __builtin_constant_p (n) && (size_t) (size) * (size_t) (n) <= 8 && (size_t) (size) != 0) ? ({ const char *__ptr = (const char *) (ptr); FILE *__stream = (stream); size_t __cnt; for (__cnt = (size_t) (size) * (size_t) (n); __cnt > 0; --__cnt) if (putc_unlocked (*__ptr++, __stream) == EOF) break; ((size_t) (size) * (size_t) (n) - __cnt) / (size_t) (size); }) : (((__builtin_constant_p (size) && (size_t) (size) == 0) || (__builtin_constant_p (n) && (size_t) (n) == 0)) ? ((void) (ptr), (void) (stream), (void) (size), (void) (n), (size_t) 0) : fwrite_unlocked (ptr, size, n, stream))))
16506#undef __STDIO_INLINE
16507#define _BITS_STDIO2_H 1
16508#undef fread_unlocked
16509#define _SYS_TYPES_H 1
16510#define __u_char_defined
16511#define __ino_t_defined
16512#define __ino64_t_defined
16513#define __dev_t_defined
16514#define __gid_t_defined
16515#define __mode_t_defined
16516#define __nlink_t_defined
16517#define __uid_t_defined
16518#define __pid_t_defined
16519#define __id_t_defined
16520#define __daddr_t_defined
16521#define __key_t_defined
16522#define __clock_t_defined 1
16523#define __clockid_t_defined 1
16524#define __time_t_defined 1
16525#define __timer_t_defined 1
16526#define __useconds_t_defined
16527#define __suseconds_t_defined
16528#define __need_size_t
16529#undef __need_size_t
16530#undef __need_NULL
16531#define _BITS_STDINT_INTN_H 1
16532#define __BIT_TYPES_DEFINED__ 1
16533#define _ENDIAN_H 1
16534#define __LITTLE_ENDIAN 1234
16535#define __BIG_ENDIAN 4321
16536#define __PDP_ENDIAN 3412
16537#define __BYTE_ORDER __LITTLE_ENDIAN
16538#define __FLOAT_WORD_ORDER __BYTE_ORDER
16539#define LITTLE_ENDIAN __LITTLE_ENDIAN
16540#define BIG_ENDIAN __BIG_ENDIAN
16541#define PDP_ENDIAN __PDP_ENDIAN
16542#define BYTE_ORDER __BYTE_ORDER
16543#define __LONG_LONG_PAIR(HI,LO) LO, HI
16544#define _BITS_BYTESWAP_H 1
16545#define __bswap_constant_16(x) ((__uint16_t) ((((x) >> 8) & 0xff) | (((x) & 0xff) << 8)))
16546#define __bswap_constant_32(x) ((((x) & 0xff000000u) >> 24) | (((x) & 0x00ff0000u) >> 8) | (((x) & 0x0000ff00u) << 8) | (((x) & 0x000000ffu) << 24))
16547#define __bswap_constant_64(x) ((((x) & 0xff00000000000000ull) >> 56) | (((x) & 0x00ff000000000000ull) >> 40) | (((x) & 0x0000ff0000000000ull) >> 24) | (((x) & 0x000000ff00000000ull) >> 8) | (((x) & 0x00000000ff000000ull) << 8) | (((x) & 0x0000000000ff0000ull) << 24) | (((x) & 0x000000000000ff00ull) << 40) | (((x) & 0x00000000000000ffull) << 56))
16548#define _BITS_UINTN_IDENTITY_H 1
16549#define htobe16(x) __bswap_16 (x)
16550#define htole16(x) __uint16_identity (x)
16551#define be16toh(x) __bswap_16 (x)
16552#define le16toh(x) __uint16_identity (x)
16553#define htobe32(x) __bswap_32 (x)
16554#define htole32(x) __uint32_identity (x)
16555#define be32toh(x) __bswap_32 (x)
16556#define le32toh(x) __uint32_identity (x)
16557#define htobe64(x) __bswap_64 (x)
16558#define htole64(x) __uint64_identity (x)
16559#define be64toh(x) __bswap_64 (x)
16560#define le64toh(x) __uint64_identity (x)
16561#define _SYS_SELECT_H 1
16562#define __WORDSIZE 64
16563#define __WORDSIZE_TIME64_COMPAT32 1
16564#define __SYSCALL_WORDSIZE 64
16565#define __FD_ZERO_STOS "stosq"
16566#define __FD_ZERO(fdsp) do { int __d0, __d1; __asm__ __volatile__ ("cld; rep; " __FD_ZERO_STOS : "=c" (__d0), "=D" (__d1) : "a" (0), "0" (sizeof (fd_set) / sizeof (__fd_mask)), "1" (&__FDS_BITS (fdsp)[0]) : "memory"); } while (0)
16567#define __FD_SET(d,set) ((void) (__FDS_BITS (set)[__FD_ELT (d)] |= __FD_MASK (d)))
16568#define __FD_CLR(d,set) ((void) (__FDS_BITS (set)[__FD_ELT (d)] &= ~__FD_MASK (d)))
16569#define __FD_ISSET(d,set) ((__FDS_BITS (set)[__FD_ELT (d)] & __FD_MASK (d)) != 0)
16570#define __sigset_t_defined 1
16571#define ____sigset_t_defined
16572#define _SIGSET_NWORDS (1024 / (8 * sizeof (unsigned long int)))
16573#define __timeval_defined 1
16574#define _STRUCT_TIMESPEC 1
16575#undef __NFDBITS
16576#define __NFDBITS (8 * (int) sizeof (__fd_mask))
16577#define __FD_ELT(d) ((d) / __NFDBITS)
16578#define __FD_MASK(d) ((__fd_mask) (1UL << ((d) % __NFDBITS)))
16579#define __FDS_BITS(set) ((set)->fds_bits)
16580#define FD_SETSIZE __FD_SETSIZE
16581#define NFDBITS __NFDBITS
16582#define FD_SET(fd,fdsetp) __FD_SET (fd, fdsetp)
16583#define FD_CLR(fd,fdsetp) __FD_CLR (fd, fdsetp)
16584#define FD_ISSET(fd,fdsetp) __FD_ISSET (fd, fdsetp)
16585#define FD_ZERO(fdsetp) __FD_ZERO (fdsetp)
16586#undef __FD_ELT
16587#define __FD_ELT(d) __extension__ ({ long int __d = (d); (__builtin_constant_p (__d) ? (0 <= __d && __d < __FD_SETSIZE ? (__d / __NFDBITS) : __fdelt_warn (__d)) : __fdelt_chk (__d)); })
16588#define __blksize_t_defined
16589#define __blkcnt_t_defined
16590#define __fsblkcnt_t_defined
16591#define __fsfilcnt_t_defined
16592#define _BITS_PTHREADTYPES_COMMON_H 1
16593#define _THREAD_SHARED_TYPES_H 1
16594#define _BITS_PTHREADTYPES_ARCH_H 1
16595#define __WORDSIZE 64
16596#define __WORDSIZE_TIME64_COMPAT32 1
16597#define __SYSCALL_WORDSIZE 64
16598#define __SIZEOF_PTHREAD_MUTEX_T 40
16599#define __SIZEOF_PTHREAD_ATTR_T 56
16600#define __SIZEOF_PTHREAD_MUTEX_T 40
16601#define __SIZEOF_PTHREAD_RWLOCK_T 56
16602#define __SIZEOF_PTHREAD_BARRIER_T 32
16603#define __SIZEOF_PTHREAD_MUTEXATTR_T 4
16604#define __SIZEOF_PTHREAD_COND_T 48
16605#define __SIZEOF_PTHREAD_CONDATTR_T 4
16606#define __SIZEOF_PTHREAD_RWLOCKATTR_T 8
16607#define __SIZEOF_PTHREAD_BARRIERATTR_T 4
16608#define __PTHREAD_COMPAT_PADDING_MID
16609#define __PTHREAD_COMPAT_PADDING_END
16610#define __PTHREAD_MUTEX_LOCK_ELISION 1
16611#define __PTHREAD_MUTEX_NUSERS_AFTER_KIND 0
16612#define __PTHREAD_MUTEX_USE_UNION 0
16613#define __LOCK_ALIGNMENT
16614#define __ONCE_ALIGNMENT
16615#define __PTHREAD_RWLOCK_ELISION_EXTRA 0, { 0, 0, 0, 0, 0, 0, 0 }
16616#define __PTHREAD_RWLOCK_INT_FLAGS_SHARED 1
16617#define __PTHREAD_SPINS_DATA short __spins; short __elision
16618#define __PTHREAD_SPINS 0, 0
16619#define __PTHREAD_MUTEX_HAVE_PREV 1
16620#define __have_pthread_attr_t 1
16621#define _SYS_STAT_H 1
16622#define _BITS_STAT_H 1
16623#define _STAT_VER_KERNEL 0
16624#define _STAT_VER_LINUX 1
16625#define _MKNOD_VER_LINUX 0
16626#define _STAT_VER _STAT_VER_LINUX
16627#define st_atime st_atim.tv_sec
16628#define st_mtime st_mtim.tv_sec
16629#define st_ctime st_ctim.tv_sec
16630#define _STATBUF_ST_BLKSIZE
16631#define _STATBUF_ST_RDEV
16632#define _STATBUF_ST_NSEC
16633#define __S_IFMT 0170000
16634#define __S_IFDIR 0040000
16635#define __S_IFCHR 0020000
16636#define __S_IFBLK 0060000
16637#define __S_IFREG 0100000
16638#define __S_IFIFO 0010000
16639#define __S_IFLNK 0120000
16640#define __S_IFSOCK 0140000
16641#define __S_TYPEISMQ(buf) ((buf)->st_mode - (buf)->st_mode)
16642#define __S_TYPEISSEM(buf) ((buf)->st_mode - (buf)->st_mode)
16643#define __S_TYPEISSHM(buf) ((buf)->st_mode - (buf)->st_mode)
16644#define __S_ISUID 04000
16645#define __S_ISGID 02000
16646#define __S_ISVTX 01000
16647#define __S_IREAD 0400
16648#define __S_IWRITE 0200
16649#define __S_IEXEC 0100
16650#define UTIME_NOW ((1l << 30) - 1l)
16651#define UTIME_OMIT ((1l << 30) - 2l)
16652#define S_IFMT __S_IFMT
16653#define S_IFDIR __S_IFDIR
16654#define S_IFCHR __S_IFCHR
16655#define S_IFBLK __S_IFBLK
16656#define S_IFREG __S_IFREG
16657#define S_IFIFO __S_IFIFO
16658#define S_IFLNK __S_IFLNK
16659#define S_IFSOCK __S_IFSOCK
16660#define __S_ISTYPE(mode,mask) (((mode) & __S_IFMT) == (mask))
16661#define S_ISDIR(mode) __S_ISTYPE((mode), __S_IFDIR)
16662#define S_ISCHR(mode) __S_ISTYPE((mode), __S_IFCHR)
16663#define S_ISBLK(mode) __S_ISTYPE((mode), __S_IFBLK)
16664#define S_ISREG(mode) __S_ISTYPE((mode), __S_IFREG)
16665#define S_ISFIFO(mode) __S_ISTYPE((mode), __S_IFIFO)
16666#define S_ISLNK(mode) __S_ISTYPE((mode), __S_IFLNK)
16667#define S_ISSOCK(mode) __S_ISTYPE((mode), __S_IFSOCK)
16668#define S_TYPEISMQ(buf) __S_TYPEISMQ(buf)
16669#define S_TYPEISSEM(buf) __S_TYPEISSEM(buf)
16670#define S_TYPEISSHM(buf) __S_TYPEISSHM(buf)
16671#define S_ISUID __S_ISUID
16672#define S_ISGID __S_ISGID
16673#define S_ISVTX __S_ISVTX
16674#define S_IRUSR __S_IREAD
16675#define S_IWUSR __S_IWRITE
16676#define S_IXUSR __S_IEXEC
16677#define S_IRWXU (__S_IREAD|__S_IWRITE|__S_IEXEC)
16678#define S_IREAD S_IRUSR
16679#define S_IWRITE S_IWUSR
16680#define S_IEXEC S_IXUSR
16681#define S_IRGRP (S_IRUSR >> 3)
16682#define S_IWGRP (S_IWUSR >> 3)
16683#define S_IXGRP (S_IXUSR >> 3)
16684#define S_IRWXG (S_IRWXU >> 3)
16685#define S_IROTH (S_IRGRP >> 3)
16686#define S_IWOTH (S_IWGRP >> 3)
16687#define S_IXOTH (S_IXGRP >> 3)
16688#define S_IRWXO (S_IRWXG >> 3)
16689#define ACCESSPERMS (S_IRWXU|S_IRWXG|S_IRWXO)
16690#define ALLPERMS (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO)
16691#define DEFFILEMODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH)
16692#define S_BLKSIZE 512
16693#define _MKNOD_VER 0
16694#define _LINUX_STAT_H
16695#define _LINUX_TYPES_H
16696#define _ASM_X86_TYPES_H
16697#define _ASM_GENERIC_TYPES_H
16698#define _ASM_GENERIC_INT_LL64_H
16699#define __ASM_X86_BITSPERLONG_H
16700#define __BITS_PER_LONG 64
16701#define __ASM_GENERIC_BITS_PER_LONG
16702#define _LINUX_POSIX_TYPES_H
16703#undef __FD_SETSIZE
16704#define __FD_SETSIZE 1024
16705#define _ASM_X86_POSIX_TYPES_64_H
16706#define __kernel_old_uid_t __kernel_old_uid_t
16707#define __kernel_old_dev_t __kernel_old_dev_t
16708#define __ASM_GENERIC_POSIX_TYPES_H
16709#define __bitwise__
16710#define __bitwise __bitwise__
16711#define __aligned_u64 __u64 __attribute__((aligned(8)))
16712#define __aligned_be64 __be64 __attribute__((aligned(8)))
16713#define __aligned_le64 __le64 __attribute__((aligned(8)))
16714#define STATX_TYPE 0x00000001U
16715#define STATX_MODE 0x00000002U
16716#define STATX_NLINK 0x00000004U
16717#define STATX_UID 0x00000008U
16718#define STATX_GID 0x00000010U
16719#define STATX_ATIME 0x00000020U
16720#define STATX_MTIME 0x00000040U
16721#define STATX_CTIME 0x00000080U
16722#define STATX_INO 0x00000100U
16723#define STATX_SIZE 0x00000200U
16724#define STATX_BLOCKS 0x00000400U
16725#define STATX_BASIC_STATS 0x000007ffU
16726#define STATX_BTIME 0x00000800U
16727#define STATX_ALL 0x00000fffU
16728#define STATX__RESERVED 0x80000000U
16729#define STATX_ATTR_COMPRESSED 0x00000004
16730#define STATX_ATTR_IMMUTABLE 0x00000010
16731#define STATX_ATTR_APPEND 0x00000020
16732#define STATX_ATTR_NODUMP 0x00000040
16733#define STATX_ATTR_ENCRYPTED 0x00000800
16734#define STATX_ATTR_AUTOMOUNT 0x00001000
16735#define __statx_timestamp_defined 1
16736#define __statx_defined 1
16737#define __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION
16738#undef __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION
16739#undef __GLIBC_USE_LIB_EXT2
16740#define __GLIBC_USE_LIB_EXT2 1
16741#undef __GLIBC_USE_IEC_60559_BFP_EXT
16742#define __GLIBC_USE_IEC_60559_BFP_EXT 1
16743#undef __GLIBC_USE_IEC_60559_FUNCS_EXT
16744#define __GLIBC_USE_IEC_60559_FUNCS_EXT 1
16745#undef __GLIBC_USE_IEC_60559_TYPES_EXT
16746#define __GLIBC_USE_IEC_60559_TYPES_EXT 1
16747#define __need_size_t
16748#define __need_wchar_t
16749#define __need_NULL
16750#undef __need_size_t
16751#define __wchar_t__
16752#define __WCHAR_T__
16753#define _WCHAR_T
16754#define _T_WCHAR_
16755#define _T_WCHAR
16756#define __WCHAR_T
16757#define _WCHAR_T_
16758#define _BSD_WCHAR_T_
16759#define _WCHAR_T_DEFINED_
16760#define _WCHAR_T_DEFINED
16761#define _WCHAR_T_H
16762#define ___int_wchar_t_h
16763#define __INT_WCHAR_T_H
16764#define _GCC_WCHAR_T
16765#define _WCHAR_T_DECLARED
16766#undef _BSD_WCHAR_T_
16767#undef __need_wchar_t
16768#undef NULL
16769#define NULL ((void *)0)
16770#undef __need_NULL
16771#define _STDLIB_H 1
16772#define WNOHANG 1
16773#define WUNTRACED 2
16774#define WSTOPPED 2
16775#define WEXITED 4
16776#define WCONTINUED 8
16777#define WNOWAIT 0x01000000
16778#define __WNOTHREAD 0x20000000
16779#define __WALL 0x40000000
16780#define __WCLONE 0x80000000
16781#define __WEXITSTATUS(status) (((status) & 0xff00) >> 8)
16782#define __WTERMSIG(status) ((status) & 0x7f)
16783#define __WSTOPSIG(status) __WEXITSTATUS(status)
16784#define __WIFEXITED(status) (__WTERMSIG(status) == 0)
16785#define __WIFSIGNALED(status) (((signed char) (((status) & 0x7f) + 1) >> 1) > 0)
16786#define __WIFSTOPPED(status) (((status) & 0xff) == 0x7f)
16787#define __WIFCONTINUED(status) ((status) == __W_CONTINUED)
16788#define __WCOREDUMP(status) ((status) & __WCOREFLAG)
16789#define __W_EXITCODE(ret,sig) ((ret) << 8 | (sig))
16790#define __W_STOPCODE(sig) ((sig) << 8 | 0x7f)
16791#define __W_CONTINUED 0xffff
16792#define __WCOREFLAG 0x80
16793#define WEXITSTATUS(status) __WEXITSTATUS (status)
16794#define WTERMSIG(status) __WTERMSIG (status)
16795#define WSTOPSIG(status) __WSTOPSIG (status)
16796#define WIFEXITED(status) __WIFEXITED (status)
16797#define WIFSIGNALED(status) __WIFSIGNALED (status)
16798#define WIFSTOPPED(status) __WIFSTOPPED (status)
16799#define WIFCONTINUED(status) __WIFCONTINUED (status)
16800#define _BITS_FLOATN_H
16801#define __HAVE_FLOAT128 1
16802#define __HAVE_DISTINCT_FLOAT128 1
16803#define __HAVE_FLOAT64X 1
16804#define __HAVE_FLOAT64X_LONG_DOUBLE 1
16805#define __f128(x) x ##f128
16806#define __CFLOAT128 _Complex _Float128
16807#define _BITS_FLOATN_COMMON_H
16808#define __HAVE_FLOAT16 0
16809#define __HAVE_FLOAT32 1
16810#define __HAVE_FLOAT64 1
16811#define __HAVE_FLOAT32X 1
16812#define __HAVE_FLOAT128X 0
16813#define __HAVE_DISTINCT_FLOAT16 __HAVE_FLOAT16
16814#define __HAVE_DISTINCT_FLOAT32 0
16815#define __HAVE_DISTINCT_FLOAT64 0
16816#define __HAVE_DISTINCT_FLOAT32X 0
16817#define __HAVE_DISTINCT_FLOAT64X 0
16818#define __HAVE_DISTINCT_FLOAT128X __HAVE_FLOAT128X
16819#define __HAVE_FLOAT128_UNLIKE_LDBL (__HAVE_DISTINCT_FLOAT128 && __LDBL_MANT_DIG__ != 113)
16820#define __HAVE_FLOATN_NOT_TYPEDEF 1
16821#define __f32(x) x ##f32
16822#define __f64(x) x ##f64
16823#define __f32x(x) x ##f32x
16824#define __f64x(x) x ##f64x
16825#define __CFLOAT32 _Complex _Float32
16826#define __CFLOAT64 _Complex _Float64
16827#define __CFLOAT32X _Complex _Float32x
16828#define __CFLOAT64X _Complex _Float64x
16829#define __ldiv_t_defined 1
16830#define __lldiv_t_defined 1
16831#define RAND_MAX 2147483647
16832#define EXIT_FAILURE 1
16833#define EXIT_SUCCESS 0
16834#define MB_CUR_MAX (__ctype_get_mb_cur_max ())
16835#define _BITS_TYPES_LOCALE_T_H 1
16836#define _BITS_TYPES___LOCALE_T_H 1
16837#define _ALLOCA_H 1
16838#define __need_size_t
16839#undef __need_size_t
16840#undef __need_NULL
16841#undef alloca
16842#define alloca(size) __builtin_alloca (size)
16843#define __COMPAR_FN_T
16844#define __STDLIB_MB_LEN_MAX 16
16845#define _STDDEF_H
16846#define _STDDEF_H_
16847#define _ANSI_STDDEF_H
16848#define _PTRDIFF_T
16849#define _T_PTRDIFF_
16850#define _T_PTRDIFF
16851#define __PTRDIFF_T
16852#define _PTRDIFF_T_
16853#define _BSD_PTRDIFF_T_
16854#define ___int_ptrdiff_t_h
16855#define _GCC_PTRDIFF_T
16856#define _PTRDIFF_T_DECLARED
16857#undef __need_ptrdiff_t
16858#undef __need_size_t
16859#undef __need_wchar_t
16860#undef NULL
16861#define NULL ((void *)0)
16862#undef __need_NULL
16863#define offsetof(TYPE,MEMBER) __builtin_offsetof (TYPE, MEMBER)
16864#define _STRING_H 1
16865#define __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION
16866#undef __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION
16867#undef __GLIBC_USE_LIB_EXT2
16868#define __GLIBC_USE_LIB_EXT2 1
16869#undef __GLIBC_USE_IEC_60559_BFP_EXT
16870#define __GLIBC_USE_IEC_60559_BFP_EXT 1
16871#undef __GLIBC_USE_IEC_60559_FUNCS_EXT
16872#define __GLIBC_USE_IEC_60559_FUNCS_EXT 1
16873#undef __GLIBC_USE_IEC_60559_TYPES_EXT
16874#define __GLIBC_USE_IEC_60559_TYPES_EXT 1
16875#define __need_size_t
16876#define __need_NULL
16877#undef __need_ptrdiff_t
16878#undef __need_size_t
16879#undef __need_wchar_t
16880#undef NULL
16881#define NULL ((void *)0)
16882#undef __need_NULL
16883#define offsetof(TYPE,MEMBER) __builtin_offsetof (TYPE, MEMBER)
16884#define strdupa(s) (__extension__ ({ const char *__old = (s); size_t __len = strlen (__old) + 1; char *__new = (char *) __builtin_alloca (__len); (char *) memcpy (__new, __old, __len); }))
16885#define strndupa(s,n) (__extension__ ({ const char *__old = (s); size_t __len = strnlen (__old, (n)); char *__new = (char *) __builtin_alloca (__len + 1); __new[__len] = '\0'; (char *) memcpy (__new, __old, __len); }))
16886#define _STRINGS_H 1
16887#define __need_size_t
16888#undef __need_ptrdiff_t
16889#undef __need_size_t
16890#undef __need_wchar_t
16891#undef NULL
16892#define NULL ((void *)0)
16893#undef __need_NULL
16894#define offsetof(TYPE,MEMBER) __builtin_offsetof (TYPE, MEMBER)
16895#define __STRINGS_FORTIFIED 1
16896#define _BITS_STRING_FORTIFIED_H 1
16897#define _INTTYPES_H 1
16898#define _STDINT_H 1
16899#define __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION
16900#undef __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION
16901#undef __GLIBC_USE_LIB_EXT2
16902#define __GLIBC_USE_LIB_EXT2 1
16903#undef __GLIBC_USE_IEC_60559_BFP_EXT
16904#define __GLIBC_USE_IEC_60559_BFP_EXT 1
16905#undef __GLIBC_USE_IEC_60559_FUNCS_EXT
16906#define __GLIBC_USE_IEC_60559_FUNCS_EXT 1
16907#undef __GLIBC_USE_IEC_60559_TYPES_EXT
16908#define __GLIBC_USE_IEC_60559_TYPES_EXT 1
16909#define _BITS_WCHAR_H 1
16910#define __WCHAR_MAX __WCHAR_MAX__
16911#define __WCHAR_MIN __WCHAR_MIN__
16912#define __WORDSIZE 64
16913#define __WORDSIZE_TIME64_COMPAT32 1
16914#define __SYSCALL_WORDSIZE 64
16915#define _BITS_STDINT_UINTN_H 1
16916#define __intptr_t_defined
16917#define __INT64_C(c) c ## L
16918#define __UINT64_C(c) c ## UL
16919#define INT8_MIN (-128)
16920#define INT16_MIN (-32767-1)
16921#define INT32_MIN (-2147483647-1)
16922#define INT64_MIN (-__INT64_C(9223372036854775807)-1)
16923#define INT8_MAX (127)
16924#define INT16_MAX (32767)
16925#define INT32_MAX (2147483647)
16926#define INT64_MAX (__INT64_C(9223372036854775807))
16927#define UINT8_MAX (255)
16928#define UINT16_MAX (65535)
16929#define UINT32_MAX (4294967295U)
16930#define UINT64_MAX (__UINT64_C(18446744073709551615))
16931#define INT_LEAST8_MIN (-128)
16932#define INT_LEAST16_MIN (-32767-1)
16933#define INT_LEAST32_MIN (-2147483647-1)
16934#define INT_LEAST64_MIN (-__INT64_C(9223372036854775807)-1)
16935#define INT_LEAST8_MAX (127)
16936#define INT_LEAST16_MAX (32767)
16937#define INT_LEAST32_MAX (2147483647)
16938#define INT_LEAST64_MAX (__INT64_C(9223372036854775807))
16939#define UINT_LEAST8_MAX (255)
16940#define UINT_LEAST16_MAX (65535)
16941#define UINT_LEAST32_MAX (4294967295U)
16942#define UINT_LEAST64_MAX (__UINT64_C(18446744073709551615))
16943#define INT_FAST8_MIN (-128)
16944#define INT_FAST16_MIN (-9223372036854775807L-1)
16945#define INT_FAST32_MIN (-9223372036854775807L-1)
16946#define INT_FAST64_MIN (-__INT64_C(9223372036854775807)-1)
16947#define INT_FAST8_MAX (127)
16948#define INT_FAST16_MAX (9223372036854775807L)
16949#define INT_FAST32_MAX (9223372036854775807L)
16950#define INT_FAST64_MAX (__INT64_C(9223372036854775807))
16951#define UINT_FAST8_MAX (255)
16952#define UINT_FAST16_MAX (18446744073709551615UL)
16953#define UINT_FAST32_MAX (18446744073709551615UL)
16954#define UINT_FAST64_MAX (__UINT64_C(18446744073709551615))
16955#define INTPTR_MIN (-9223372036854775807L-1)
16956#define INTPTR_MAX (9223372036854775807L)
16957#define UINTPTR_MAX (18446744073709551615UL)
16958#define INTMAX_MIN (-__INT64_C(9223372036854775807)-1)
16959#define INTMAX_MAX (__INT64_C(9223372036854775807))
16960#define UINTMAX_MAX (__UINT64_C(18446744073709551615))
16961#define PTRDIFF_MIN (-9223372036854775807L-1)
16962#define PTRDIFF_MAX (9223372036854775807L)
16963#define SIG_ATOMIC_MIN (-2147483647-1)
16964#define SIG_ATOMIC_MAX (2147483647)
16965#define SIZE_MAX (18446744073709551615UL)
16966#define WCHAR_MIN __WCHAR_MIN
16967#define WCHAR_MAX __WCHAR_MAX
16968#define WINT_MIN (0u)
16969#define WINT_MAX (4294967295u)
16970#define INT8_C(c) c
16971#define INT16_C(c) c
16972#define INT32_C(c) c
16973#define INT64_C(c) c ## L
16974#define UINT8_C(c) c
16975#define UINT16_C(c) c
16976#define UINT32_C(c) c ## U
16977#define UINT64_C(c) c ## UL
16978#define INTMAX_C(c) c ## L
16979#define UINTMAX_C(c) c ## UL
16980#define INT8_WIDTH 8
16981#define UINT8_WIDTH 8
16982#define INT16_WIDTH 16
16983#define UINT16_WIDTH 16
16984#define INT32_WIDTH 32
16985#define UINT32_WIDTH 32
16986#define INT64_WIDTH 64
16987#define UINT64_WIDTH 64
16988#define INT_LEAST8_WIDTH 8
16989#define UINT_LEAST8_WIDTH 8
16990#define INT_LEAST16_WIDTH 16
16991#define UINT_LEAST16_WIDTH 16
16992#define INT_LEAST32_WIDTH 32
16993#define UINT_LEAST32_WIDTH 32
16994#define INT_LEAST64_WIDTH 64
16995#define UINT_LEAST64_WIDTH 64
16996#define INT_FAST8_WIDTH 8
16997#define UINT_FAST8_WIDTH 8
16998#define INT_FAST16_WIDTH __WORDSIZE
16999#define UINT_FAST16_WIDTH __WORDSIZE
17000#define INT_FAST32_WIDTH __WORDSIZE
17001#define UINT_FAST32_WIDTH __WORDSIZE
17002#define INT_FAST64_WIDTH 64
17003#define UINT_FAST64_WIDTH 64
17004#define INTPTR_WIDTH __WORDSIZE
17005#define UINTPTR_WIDTH __WORDSIZE
17006#define INTMAX_WIDTH 64
17007#define UINTMAX_WIDTH 64
17008#define PTRDIFF_WIDTH __WORDSIZE
17009#define SIG_ATOMIC_WIDTH 32
17010#define SIZE_WIDTH __WORDSIZE
17011#define WCHAR_WIDTH 32
17012#define WINT_WIDTH 32
17013#define _GCC_WRAP_STDINT_H
17014#define ____gwchar_t_defined 1
17015#define __PRI64_PREFIX "l"
17016#define __PRIPTR_PREFIX "l"
17017#define PRId8 "d"
17018#define PRId16 "d"
17019#define PRId32 "d"
17020#define PRId64 __PRI64_PREFIX "d"
17021#define PRIdLEAST8 "d"
17022#define PRIdLEAST16 "d"
17023#define PRIdLEAST32 "d"
17024#define PRIdLEAST64 __PRI64_PREFIX "d"
17025#define PRIdFAST8 "d"
17026#define PRIdFAST16 __PRIPTR_PREFIX "d"
17027#define PRIdFAST32 __PRIPTR_PREFIX "d"
17028#define PRIdFAST64 __PRI64_PREFIX "d"
17029#define PRIi8 "i"
17030#define PRIi16 "i"
17031#define PRIi32 "i"
17032#define PRIi64 __PRI64_PREFIX "i"
17033#define PRIiLEAST8 "i"
17034#define PRIiLEAST16 "i"
17035#define PRIiLEAST32 "i"
17036#define PRIiLEAST64 __PRI64_PREFIX "i"
17037#define PRIiFAST8 "i"
17038#define PRIiFAST16 __PRIPTR_PREFIX "i"
17039#define PRIiFAST32 __PRIPTR_PREFIX "i"
17040#define PRIiFAST64 __PRI64_PREFIX "i"
17041#define PRIo8 "o"
17042#define PRIo16 "o"
17043#define PRIo32 "o"
17044#define PRIo64 __PRI64_PREFIX "o"
17045#define PRIoLEAST8 "o"
17046#define PRIoLEAST16 "o"
17047#define PRIoLEAST32 "o"
17048#define PRIoLEAST64 __PRI64_PREFIX "o"
17049#define PRIoFAST8 "o"
17050#define PRIoFAST16 __PRIPTR_PREFIX "o"
17051#define PRIoFAST32 __PRIPTR_PREFIX "o"
17052#define PRIoFAST64 __PRI64_PREFIX "o"
17053#define PRIu8 "u"
17054#define PRIu16 "u"
17055#define PRIu32 "u"
17056#define PRIu64 __PRI64_PREFIX "u"
17057#define PRIuLEAST8 "u"
17058#define PRIuLEAST16 "u"
17059#define PRIuLEAST32 "u"
17060#define PRIuLEAST64 __PRI64_PREFIX "u"
17061#define PRIuFAST8 "u"
17062#define PRIuFAST16 __PRIPTR_PREFIX "u"
17063#define PRIuFAST32 __PRIPTR_PREFIX "u"
17064#define PRIuFAST64 __PRI64_PREFIX "u"
17065#define PRIx8 "x"
17066#define PRIx16 "x"
17067#define PRIx32 "x"
17068#define PRIx64 __PRI64_PREFIX "x"
17069#define PRIxLEAST8 "x"
17070#define PRIxLEAST16 "x"
17071#define PRIxLEAST32 "x"
17072#define PRIxLEAST64 __PRI64_PREFIX "x"
17073#define PRIxFAST8 "x"
17074#define PRIxFAST16 __PRIPTR_PREFIX "x"
17075#define PRIxFAST32 __PRIPTR_PREFIX "x"
17076#define PRIxFAST64 __PRI64_PREFIX "x"
17077#define PRIX8 "X"
17078#define PRIX16 "X"
17079#define PRIX32 "X"
17080#define PRIX64 __PRI64_PREFIX "X"
17081#define PRIXLEAST8 "X"
17082#define PRIXLEAST16 "X"
17083#define PRIXLEAST32 "X"
17084#define PRIXLEAST64 __PRI64_PREFIX "X"
17085#define PRIXFAST8 "X"
17086#define PRIXFAST16 __PRIPTR_PREFIX "X"
17087#define PRIXFAST32 __PRIPTR_PREFIX "X"
17088#define PRIXFAST64 __PRI64_PREFIX "X"
17089#define PRIdMAX __PRI64_PREFIX "d"
17090#define PRIiMAX __PRI64_PREFIX "i"
17091#define PRIoMAX __PRI64_PREFIX "o"
17092#define PRIuMAX __PRI64_PREFIX "u"
17093#define PRIxMAX __PRI64_PREFIX "x"
17094#define PRIXMAX __PRI64_PREFIX "X"
17095#define PRIdPTR __PRIPTR_PREFIX "d"
17096#define PRIiPTR __PRIPTR_PREFIX "i"
17097#define PRIoPTR __PRIPTR_PREFIX "o"
17098#define PRIuPTR __PRIPTR_PREFIX "u"
17099#define PRIxPTR __PRIPTR_PREFIX "x"
17100#define PRIXPTR __PRIPTR_PREFIX "X"
17101#define SCNd8 "hhd"
17102#define SCNd16 "hd"
17103#define SCNd32 "d"
17104#define SCNd64 __PRI64_PREFIX "d"
17105#define SCNdLEAST8 "hhd"
17106#define SCNdLEAST16 "hd"
17107#define SCNdLEAST32 "d"
17108#define SCNdLEAST64 __PRI64_PREFIX "d"
17109#define SCNdFAST8 "hhd"
17110#define SCNdFAST16 __PRIPTR_PREFIX "d"
17111#define SCNdFAST32 __PRIPTR_PREFIX "d"
17112#define SCNdFAST64 __PRI64_PREFIX "d"
17113#define SCNi8 "hhi"
17114#define SCNi16 "hi"
17115#define SCNi32 "i"
17116#define SCNi64 __PRI64_PREFIX "i"
17117#define SCNiLEAST8 "hhi"
17118#define SCNiLEAST16 "hi"
17119#define SCNiLEAST32 "i"
17120#define SCNiLEAST64 __PRI64_PREFIX "i"
17121#define SCNiFAST8 "hhi"
17122#define SCNiFAST16 __PRIPTR_PREFIX "i"
17123#define SCNiFAST32 __PRIPTR_PREFIX "i"
17124#define SCNiFAST64 __PRI64_PREFIX "i"
17125#define SCNu8 "hhu"
17126#define SCNu16 "hu"
17127#define SCNu32 "u"
17128#define SCNu64 __PRI64_PREFIX "u"
17129#define SCNuLEAST8 "hhu"
17130#define SCNuLEAST16 "hu"
17131#define SCNuLEAST32 "u"
17132#define SCNuLEAST64 __PRI64_PREFIX "u"
17133#define SCNuFAST8 "hhu"
17134#define SCNuFAST16 __PRIPTR_PREFIX "u"
17135#define SCNuFAST32 __PRIPTR_PREFIX "u"
17136#define SCNuFAST64 __PRI64_PREFIX "u"
17137#define SCNo8 "hho"
17138#define SCNo16 "ho"
17139#define SCNo32 "o"
17140#define SCNo64 __PRI64_PREFIX "o"
17141#define SCNoLEAST8 "hho"
17142#define SCNoLEAST16 "ho"
17143#define SCNoLEAST32 "o"
17144#define SCNoLEAST64 __PRI64_PREFIX "o"
17145#define SCNoFAST8 "hho"
17146#define SCNoFAST16 __PRIPTR_PREFIX "o"
17147#define SCNoFAST32 __PRIPTR_PREFIX "o"
17148#define SCNoFAST64 __PRI64_PREFIX "o"
17149#define SCNx8 "hhx"
17150#define SCNx16 "hx"
17151#define SCNx32 "x"
17152#define SCNx64 __PRI64_PREFIX "x"
17153#define SCNxLEAST8 "hhx"
17154#define SCNxLEAST16 "hx"
17155#define SCNxLEAST32 "x"
17156#define SCNxLEAST64 __PRI64_PREFIX "x"
17157#define SCNxFAST8 "hhx"
17158#define SCNxFAST16 __PRIPTR_PREFIX "x"
17159#define SCNxFAST32 __PRIPTR_PREFIX "x"
17160#define SCNxFAST64 __PRI64_PREFIX "x"
17161#define SCNdMAX __PRI64_PREFIX "d"
17162#define SCNiMAX __PRI64_PREFIX "i"
17163#define SCNoMAX __PRI64_PREFIX "o"
17164#define SCNuMAX __PRI64_PREFIX "u"
17165#define SCNxMAX __PRI64_PREFIX "x"
17166#define SCNdPTR __PRIPTR_PREFIX "d"
17167#define SCNiPTR __PRIPTR_PREFIX "i"
17168#define SCNoPTR __PRIPTR_PREFIX "o"
17169#define SCNuPTR __PRIPTR_PREFIX "u"
17170#define SCNxPTR __PRIPTR_PREFIX "x"
17171#define _STDALIGN_H
17172#define alignas _Alignas
17173#define alignof _Alignof
17174#define __alignas_is_defined 1
17175#define __alignof_is_defined 1
17176#define _UNISTD_H 1
17177#define _POSIX_VERSION 200809L
17178#define __POSIX2_THIS_VERSION 200809L
17179#define _POSIX2_VERSION __POSIX2_THIS_VERSION
17180#define _POSIX2_C_VERSION __POSIX2_THIS_VERSION
17181#define _POSIX2_C_BIND __POSIX2_THIS_VERSION
17182#define _POSIX2_C_DEV __POSIX2_THIS_VERSION
17183#define _POSIX2_SW_DEV __POSIX2_THIS_VERSION
17184#define _POSIX2_LOCALEDEF __POSIX2_THIS_VERSION
17185#define _XOPEN_VERSION 700
17186#define _XOPEN_XCU_VERSION 4
17187#define _XOPEN_XPG2 1
17188#define _XOPEN_XPG3 1
17189#define _XOPEN_XPG4 1
17190#define _XOPEN_UNIX 1
17191#define _XOPEN_ENH_I18N 1
17192#define _XOPEN_LEGACY 1
17193#define _BITS_POSIX_OPT_H 1
17194#define _POSIX_JOB_CONTROL 1
17195#define _POSIX_SAVED_IDS 1
17196#define _POSIX_PRIORITY_SCHEDULING 200809L
17197#define _POSIX_SYNCHRONIZED_IO 200809L
17198#define _POSIX_FSYNC 200809L
17199#define _POSIX_MAPPED_FILES 200809L
17200#define _POSIX_MEMLOCK 200809L
17201#define _POSIX_MEMLOCK_RANGE 200809L
17202#define _POSIX_MEMORY_PROTECTION 200809L
17203#define _POSIX_CHOWN_RESTRICTED 0
17204#define _POSIX_VDISABLE '\0'
17205#define _POSIX_NO_TRUNC 1
17206#define _XOPEN_REALTIME 1
17207#define _XOPEN_REALTIME_THREADS 1
17208#define _XOPEN_SHM 1
17209#define _POSIX_THREADS 200809L
17210#define _POSIX_REENTRANT_FUNCTIONS 1
17211#define _POSIX_THREAD_SAFE_FUNCTIONS 200809L
17212#define _POSIX_THREAD_PRIORITY_SCHEDULING 200809L
17213#define _POSIX_THREAD_ATTR_STACKSIZE 200809L
17214#define _POSIX_THREAD_ATTR_STACKADDR 200809L
17215#define _POSIX_THREAD_PRIO_INHERIT 200809L
17216#define _POSIX_THREAD_PRIO_PROTECT 200809L
17217#define _POSIX_THREAD_ROBUST_PRIO_INHERIT 200809L
17218#define _POSIX_THREAD_ROBUST_PRIO_PROTECT -1
17219#define _POSIX_SEMAPHORES 200809L
17220#define _POSIX_REALTIME_SIGNALS 200809L
17221#define _POSIX_ASYNCHRONOUS_IO 200809L
17222#define _POSIX_ASYNC_IO 1
17223#define _LFS_ASYNCHRONOUS_IO 1
17224#define _POSIX_PRIORITIZED_IO 200809L
17225#define _LFS64_ASYNCHRONOUS_IO 1
17226#define _LFS_LARGEFILE 1
17227#define _LFS64_LARGEFILE 1
17228#define _LFS64_STDIO 1
17229#define _POSIX_SHARED_MEMORY_OBJECTS 200809L
17230#define _POSIX_CPUTIME 0
17231#define _POSIX_THREAD_CPUTIME 0
17232#define _POSIX_REGEXP 1
17233#define _POSIX_READER_WRITER_LOCKS 200809L
17234#define _POSIX_SHELL 1
17235#define _POSIX_TIMEOUTS 200809L
17236#define _POSIX_SPIN_LOCKS 200809L
17237#define _POSIX_SPAWN 200809L
17238#define _POSIX_TIMERS 200809L
17239#define _POSIX_BARRIERS 200809L
17240#define _POSIX_MESSAGE_PASSING 200809L
17241#define _POSIX_THREAD_PROCESS_SHARED 200809L
17242#define _POSIX_MONOTONIC_CLOCK 0
17243#define _POSIX_CLOCK_SELECTION 200809L
17244#define _POSIX_ADVISORY_INFO 200809L
17245#define _POSIX_IPV6 200809L
17246#define _POSIX_RAW_SOCKETS 200809L
17247#define _POSIX2_CHAR_TERM 200809L
17248#define _POSIX_SPORADIC_SERVER -1
17249#define _POSIX_THREAD_SPORADIC_SERVER -1
17250#define _POSIX_TRACE -1
17251#define _POSIX_TRACE_EVENT_FILTER -1
17252#define _POSIX_TRACE_INHERIT -1
17253#define _POSIX_TRACE_LOG -1
17254#define _POSIX_TYPED_MEMORY_OBJECTS -1
17255#define __WORDSIZE 64
17256#define __WORDSIZE_TIME64_COMPAT32 1
17257#define __SYSCALL_WORDSIZE 64
17258#define _POSIX_V7_LPBIG_OFFBIG -1
17259#define _POSIX_V6_LPBIG_OFFBIG -1
17260#define _XBS5_LPBIG_OFFBIG -1
17261#define _POSIX_V7_LP64_OFF64 1
17262#define _POSIX_V6_LP64_OFF64 1
17263#define _XBS5_LP64_OFF64 1
17264#define __ILP32_OFF32_CFLAGS "-m32"
17265#define __ILP32_OFF32_LDFLAGS "-m32"
17266#define __ILP32_OFFBIG_CFLAGS "-m32 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
17267#define __ILP32_OFFBIG_LDFLAGS "-m32"
17268#define __LP64_OFF64_CFLAGS "-m64"
17269#define __LP64_OFF64_LDFLAGS "-m64"
17270#define STDIN_FILENO 0
17271#define STDOUT_FILENO 1
17272#define STDERR_FILENO 2
17273#define __need_size_t
17274#define __need_NULL
17275#undef __need_ptrdiff_t
17276#undef __need_size_t
17277#undef __need_wchar_t
17278#undef NULL
17279#define NULL ((void *)0)
17280#undef __need_NULL
17281#define offsetof(TYPE,MEMBER) __builtin_offsetof (TYPE, MEMBER)
17282#define __socklen_t_defined
17283#define R_OK 4
17284#define W_OK 2
17285#define X_OK 1
17286#define F_OK 0
17287#define L_SET SEEK_SET
17288#define L_INCR SEEK_CUR
17289#define L_XTND SEEK_END
17290#define _PC_LINK_MAX _PC_LINK_MAX
17291#define _PC_MAX_CANON _PC_MAX_CANON
17292#define _PC_MAX_INPUT _PC_MAX_INPUT
17293#define _PC_NAME_MAX _PC_NAME_MAX
17294#define _PC_PATH_MAX _PC_PATH_MAX
17295#define _PC_PIPE_BUF _PC_PIPE_BUF
17296#define _PC_CHOWN_RESTRICTED _PC_CHOWN_RESTRICTED
17297#define _PC_NO_TRUNC _PC_NO_TRUNC
17298#define _PC_VDISABLE _PC_VDISABLE
17299#define _PC_SYNC_IO _PC_SYNC_IO
17300#define _PC_ASYNC_IO _PC_ASYNC_IO
17301#define _PC_PRIO_IO _PC_PRIO_IO
17302#define _PC_SOCK_MAXBUF _PC_SOCK_MAXBUF
17303#define _PC_FILESIZEBITS _PC_FILESIZEBITS
17304#define _PC_REC_INCR_XFER_SIZE _PC_REC_INCR_XFER_SIZE
17305#define _PC_REC_MAX_XFER_SIZE _PC_REC_MAX_XFER_SIZE
17306#define _PC_REC_MIN_XFER_SIZE _PC_REC_MIN_XFER_SIZE
17307#define _PC_REC_XFER_ALIGN _PC_REC_XFER_ALIGN
17308#define _PC_ALLOC_SIZE_MIN _PC_ALLOC_SIZE_MIN
17309#define _PC_SYMLINK_MAX _PC_SYMLINK_MAX
17310#define _PC_2_SYMLINKS _PC_2_SYMLINKS
17311#define _SC_ARG_MAX _SC_ARG_MAX
17312#define _SC_CHILD_MAX _SC_CHILD_MAX
17313#define _SC_CLK_TCK _SC_CLK_TCK
17314#define _SC_NGROUPS_MAX _SC_NGROUPS_MAX
17315#define _SC_OPEN_MAX _SC_OPEN_MAX
17316#define _SC_STREAM_MAX _SC_STREAM_MAX
17317#define _SC_TZNAME_MAX _SC_TZNAME_MAX
17318#define _SC_JOB_CONTROL _SC_JOB_CONTROL
17319#define _SC_SAVED_IDS _SC_SAVED_IDS
17320#define _SC_REALTIME_SIGNALS _SC_REALTIME_SIGNALS
17321#define _SC_PRIORITY_SCHEDULING _SC_PRIORITY_SCHEDULING
17322#define _SC_TIMERS _SC_TIMERS
17323#define _SC_ASYNCHRONOUS_IO _SC_ASYNCHRONOUS_IO
17324#define _SC_PRIORITIZED_IO _SC_PRIORITIZED_IO
17325#define _SC_SYNCHRONIZED_IO _SC_SYNCHRONIZED_IO
17326#define _SC_FSYNC _SC_FSYNC
17327#define _SC_MAPPED_FILES _SC_MAPPED_FILES
17328#define _SC_MEMLOCK _SC_MEMLOCK
17329#define _SC_MEMLOCK_RANGE _SC_MEMLOCK_RANGE
17330#define _SC_MEMORY_PROTECTION _SC_MEMORY_PROTECTION
17331#define _SC_MESSAGE_PASSING _SC_MESSAGE_PASSING
17332#define _SC_SEMAPHORES _SC_SEMAPHORES
17333#define _SC_SHARED_MEMORY_OBJECTS _SC_SHARED_MEMORY_OBJECTS
17334#define _SC_AIO_LISTIO_MAX _SC_AIO_LISTIO_MAX
17335#define _SC_AIO_MAX _SC_AIO_MAX
17336#define _SC_AIO_PRIO_DELTA_MAX _SC_AIO_PRIO_DELTA_MAX
17337#define _SC_DELAYTIMER_MAX _SC_DELAYTIMER_MAX
17338#define _SC_MQ_OPEN_MAX _SC_MQ_OPEN_MAX
17339#define _SC_MQ_PRIO_MAX _SC_MQ_PRIO_MAX
17340#define _SC_VERSION _SC_VERSION
17341#define _SC_PAGESIZE _SC_PAGESIZE
17342#define _SC_PAGE_SIZE _SC_PAGESIZE
17343#define _SC_RTSIG_MAX _SC_RTSIG_MAX
17344#define _SC_SEM_NSEMS_MAX _SC_SEM_NSEMS_MAX
17345#define _SC_SEM_VALUE_MAX _SC_SEM_VALUE_MAX
17346#define _SC_SIGQUEUE_MAX _SC_SIGQUEUE_MAX
17347#define _SC_TIMER_MAX _SC_TIMER_MAX
17348#define _SC_BC_BASE_MAX _SC_BC_BASE_MAX
17349#define _SC_BC_DIM_MAX _SC_BC_DIM_MAX
17350#define _SC_BC_SCALE_MAX _SC_BC_SCALE_MAX
17351#define _SC_BC_STRING_MAX _SC_BC_STRING_MAX
17352#define _SC_COLL_WEIGHTS_MAX _SC_COLL_WEIGHTS_MAX
17353#define _SC_EQUIV_CLASS_MAX _SC_EQUIV_CLASS_MAX
17354#define _SC_EXPR_NEST_MAX _SC_EXPR_NEST_MAX
17355#define _SC_LINE_MAX _SC_LINE_MAX
17356#define _SC_RE_DUP_MAX _SC_RE_DUP_MAX
17357#define _SC_CHARCLASS_NAME_MAX _SC_CHARCLASS_NAME_MAX
17358#define _SC_2_VERSION _SC_2_VERSION
17359#define _SC_2_C_BIND _SC_2_C_BIND
17360#define _SC_2_C_DEV _SC_2_C_DEV
17361#define _SC_2_FORT_DEV _SC_2_FORT_DEV
17362#define _SC_2_FORT_RUN _SC_2_FORT_RUN
17363#define _SC_2_SW_DEV _SC_2_SW_DEV
17364#define _SC_2_LOCALEDEF _SC_2_LOCALEDEF
17365#define _SC_PII _SC_PII
17366#define _SC_PII_XTI _SC_PII_XTI
17367#define _SC_PII_SOCKET _SC_PII_SOCKET
17368#define _SC_PII_INTERNET _SC_PII_INTERNET
17369#define _SC_PII_OSI _SC_PII_OSI
17370#define _SC_POLL _SC_POLL
17371#define _SC_SELECT _SC_SELECT
17372#define _SC_UIO_MAXIOV _SC_UIO_MAXIOV
17373#define _SC_IOV_MAX _SC_IOV_MAX
17374#define _SC_PII_INTERNET_STREAM _SC_PII_INTERNET_STREAM
17375#define _SC_PII_INTERNET_DGRAM _SC_PII_INTERNET_DGRAM
17376#define _SC_PII_OSI_COTS _SC_PII_OSI_COTS
17377#define _SC_PII_OSI_CLTS _SC_PII_OSI_CLTS
17378#define _SC_PII_OSI_M _SC_PII_OSI_M
17379#define _SC_T_IOV_MAX _SC_T_IOV_MAX
17380#define _SC_THREADS _SC_THREADS
17381#define _SC_THREAD_SAFE_FUNCTIONS _SC_THREAD_SAFE_FUNCTIONS
17382#define _SC_GETGR_R_SIZE_MAX _SC_GETGR_R_SIZE_MAX
17383#define _SC_GETPW_R_SIZE_MAX _SC_GETPW_R_SIZE_MAX
17384#define _SC_LOGIN_NAME_MAX _SC_LOGIN_NAME_MAX
17385#define _SC_TTY_NAME_MAX _SC_TTY_NAME_MAX
17386#define _SC_THREAD_DESTRUCTOR_ITERATIONS _SC_THREAD_DESTRUCTOR_ITERATIONS
17387#define _SC_THREAD_KEYS_MAX _SC_THREAD_KEYS_MAX
17388#define _SC_THREAD_STACK_MIN _SC_THREAD_STACK_MIN
17389#define _SC_THREAD_THREADS_MAX _SC_THREAD_THREADS_MAX
17390#define _SC_THREAD_ATTR_STACKADDR _SC_THREAD_ATTR_STACKADDR
17391#define _SC_THREAD_ATTR_STACKSIZE _SC_THREAD_ATTR_STACKSIZE
17392#define _SC_THREAD_PRIORITY_SCHEDULING _SC_THREAD_PRIORITY_SCHEDULING
17393#define _SC_THREAD_PRIO_INHERIT _SC_THREAD_PRIO_INHERIT
17394#define _SC_THREAD_PRIO_PROTECT _SC_THREAD_PRIO_PROTECT
17395#define _SC_THREAD_PROCESS_SHARED _SC_THREAD_PROCESS_SHARED
17396#define _SC_NPROCESSORS_CONF _SC_NPROCESSORS_CONF
17397#define _SC_NPROCESSORS_ONLN _SC_NPROCESSORS_ONLN
17398#define _SC_PHYS_PAGES _SC_PHYS_PAGES
17399#define _SC_AVPHYS_PAGES _SC_AVPHYS_PAGES
17400#define _SC_ATEXIT_MAX _SC_ATEXIT_MAX
17401#define _SC_PASS_MAX _SC_PASS_MAX
17402#define _SC_XOPEN_VERSION _SC_XOPEN_VERSION
17403#define _SC_XOPEN_XCU_VERSION _SC_XOPEN_XCU_VERSION
17404#define _SC_XOPEN_UNIX _SC_XOPEN_UNIX
17405#define _SC_XOPEN_CRYPT _SC_XOPEN_CRYPT
17406#define _SC_XOPEN_ENH_I18N _SC_XOPEN_ENH_I18N
17407#define _SC_XOPEN_SHM _SC_XOPEN_SHM
17408#define _SC_2_CHAR_TERM _SC_2_CHAR_TERM
17409#define _SC_2_C_VERSION _SC_2_C_VERSION
17410#define _SC_2_UPE _SC_2_UPE
17411#define _SC_XOPEN_XPG2 _SC_XOPEN_XPG2
17412#define _SC_XOPEN_XPG3 _SC_XOPEN_XPG3
17413#define _SC_XOPEN_XPG4 _SC_XOPEN_XPG4
17414#define _SC_CHAR_BIT _SC_CHAR_BIT
17415#define _SC_CHAR_MAX _SC_CHAR_MAX
17416#define _SC_CHAR_MIN _SC_CHAR_MIN
17417#define _SC_INT_MAX _SC_INT_MAX
17418#define _SC_INT_MIN _SC_INT_MIN
17419#define _SC_LONG_BIT _SC_LONG_BIT
17420#define _SC_WORD_BIT _SC_WORD_BIT
17421#define _SC_MB_LEN_MAX _SC_MB_LEN_MAX
17422#define _SC_NZERO _SC_NZERO
17423#define _SC_SSIZE_MAX _SC_SSIZE_MAX
17424#define _SC_SCHAR_MAX _SC_SCHAR_MAX
17425#define _SC_SCHAR_MIN _SC_SCHAR_MIN
17426#define _SC_SHRT_MAX _SC_SHRT_MAX
17427#define _SC_SHRT_MIN _SC_SHRT_MIN
17428#define _SC_UCHAR_MAX _SC_UCHAR_MAX
17429#define _SC_UINT_MAX _SC_UINT_MAX
17430#define _SC_ULONG_MAX _SC_ULONG_MAX
17431#define _SC_USHRT_MAX _SC_USHRT_MAX
17432#define _SC_NL_ARGMAX _SC_NL_ARGMAX
17433#define _SC_NL_LANGMAX _SC_NL_LANGMAX
17434#define _SC_NL_MSGMAX _SC_NL_MSGMAX
17435#define _SC_NL_NMAX _SC_NL_NMAX
17436#define _SC_NL_SETMAX _SC_NL_SETMAX
17437#define _SC_NL_TEXTMAX _SC_NL_TEXTMAX
17438#define _SC_XBS5_ILP32_OFF32 _SC_XBS5_ILP32_OFF32
17439#define _SC_XBS5_ILP32_OFFBIG _SC_XBS5_ILP32_OFFBIG
17440#define _SC_XBS5_LP64_OFF64 _SC_XBS5_LP64_OFF64
17441#define _SC_XBS5_LPBIG_OFFBIG _SC_XBS5_LPBIG_OFFBIG
17442#define _SC_XOPEN_LEGACY _SC_XOPEN_LEGACY
17443#define _SC_XOPEN_REALTIME _SC_XOPEN_REALTIME
17444#define _SC_XOPEN_REALTIME_THREADS _SC_XOPEN_REALTIME_THREADS
17445#define _SC_ADVISORY_INFO _SC_ADVISORY_INFO
17446#define _SC_BARRIERS _SC_BARRIERS
17447#define _SC_BASE _SC_BASE
17448#define _SC_C_LANG_SUPPORT _SC_C_LANG_SUPPORT
17449#define _SC_C_LANG_SUPPORT_R _SC_C_LANG_SUPPORT_R
17450#define _SC_CLOCK_SELECTION _SC_CLOCK_SELECTION
17451#define _SC_CPUTIME _SC_CPUTIME
17452#define _SC_THREAD_CPUTIME _SC_THREAD_CPUTIME
17453#define _SC_DEVICE_IO _SC_DEVICE_IO
17454#define _SC_DEVICE_SPECIFIC _SC_DEVICE_SPECIFIC
17455#define _SC_DEVICE_SPECIFIC_R _SC_DEVICE_SPECIFIC_R
17456#define _SC_FD_MGMT _SC_FD_MGMT
17457#define _SC_FIFO _SC_FIFO
17458#define _SC_PIPE _SC_PIPE
17459#define _SC_FILE_ATTRIBUTES _SC_FILE_ATTRIBUTES
17460#define _SC_FILE_LOCKING _SC_FILE_LOCKING
17461#define _SC_FILE_SYSTEM _SC_FILE_SYSTEM
17462#define _SC_MONOTONIC_CLOCK _SC_MONOTONIC_CLOCK
17463#define _SC_MULTI_PROCESS _SC_MULTI_PROCESS
17464#define _SC_SINGLE_PROCESS _SC_SINGLE_PROCESS
17465#define _SC_NETWORKING _SC_NETWORKING
17466#define _SC_READER_WRITER_LOCKS _SC_READER_WRITER_LOCKS
17467#define _SC_SPIN_LOCKS _SC_SPIN_LOCKS
17468#define _SC_REGEXP _SC_REGEXP
17469#define _SC_REGEX_VERSION _SC_REGEX_VERSION
17470#define _SC_SHELL _SC_SHELL
17471#define _SC_SIGNALS _SC_SIGNALS
17472#define _SC_SPAWN _SC_SPAWN
17473#define _SC_SPORADIC_SERVER _SC_SPORADIC_SERVER
17474#define _SC_THREAD_SPORADIC_SERVER _SC_THREAD_SPORADIC_SERVER
17475#define _SC_SYSTEM_DATABASE _SC_SYSTEM_DATABASE
17476#define _SC_SYSTEM_DATABASE_R _SC_SYSTEM_DATABASE_R
17477#define _SC_TIMEOUTS _SC_TIMEOUTS
17478#define _SC_TYPED_MEMORY_OBJECTS _SC_TYPED_MEMORY_OBJECTS
17479#define _SC_USER_GROUPS _SC_USER_GROUPS
17480#define _SC_USER_GROUPS_R _SC_USER_GROUPS_R
17481#define _SC_2_PBS _SC_2_PBS
17482#define _SC_2_PBS_ACCOUNTING _SC_2_PBS_ACCOUNTING
17483#define _SC_2_PBS_LOCATE _SC_2_PBS_LOCATE
17484#define _SC_2_PBS_MESSAGE _SC_2_PBS_MESSAGE
17485#define _SC_2_PBS_TRACK _SC_2_PBS_TRACK
17486#define _SC_SYMLOOP_MAX _SC_SYMLOOP_MAX
17487#define _SC_STREAMS _SC_STREAMS
17488#define _SC_2_PBS_CHECKPOINT _SC_2_PBS_CHECKPOINT
17489#define _SC_V6_ILP32_OFF32 _SC_V6_ILP32_OFF32
17490#define _SC_V6_ILP32_OFFBIG _SC_V6_ILP32_OFFBIG
17491#define _SC_V6_LP64_OFF64 _SC_V6_LP64_OFF64
17492#define _SC_V6_LPBIG_OFFBIG _SC_V6_LPBIG_OFFBIG
17493#define _SC_HOST_NAME_MAX _SC_HOST_NAME_MAX
17494#define _SC_TRACE _SC_TRACE
17495#define _SC_TRACE_EVENT_FILTER _SC_TRACE_EVENT_FILTER
17496#define _SC_TRACE_INHERIT _SC_TRACE_INHERIT
17497#define _SC_TRACE_LOG _SC_TRACE_LOG
17498#define _SC_LEVEL1_ICACHE_SIZE _SC_LEVEL1_ICACHE_SIZE
17499#define _SC_LEVEL1_ICACHE_ASSOC _SC_LEVEL1_ICACHE_ASSOC
17500#define _SC_LEVEL1_ICACHE_LINESIZE _SC_LEVEL1_ICACHE_LINESIZE
17501#define _SC_LEVEL1_DCACHE_SIZE _SC_LEVEL1_DCACHE_SIZE
17502#define _SC_LEVEL1_DCACHE_ASSOC _SC_LEVEL1_DCACHE_ASSOC
17503#define _SC_LEVEL1_DCACHE_LINESIZE _SC_LEVEL1_DCACHE_LINESIZE
17504#define _SC_LEVEL2_CACHE_SIZE _SC_LEVEL2_CACHE_SIZE
17505#define _SC_LEVEL2_CACHE_ASSOC _SC_LEVEL2_CACHE_ASSOC
17506#define _SC_LEVEL2_CACHE_LINESIZE _SC_LEVEL2_CACHE_LINESIZE
17507#define _SC_LEVEL3_CACHE_SIZE _SC_LEVEL3_CACHE_SIZE
17508#define _SC_LEVEL3_CACHE_ASSOC _SC_LEVEL3_CACHE_ASSOC
17509#define _SC_LEVEL3_CACHE_LINESIZE _SC_LEVEL3_CACHE_LINESIZE
17510#define _SC_LEVEL4_CACHE_SIZE _SC_LEVEL4_CACHE_SIZE
17511#define _SC_LEVEL4_CACHE_ASSOC _SC_LEVEL4_CACHE_ASSOC
17512#define _SC_LEVEL4_CACHE_LINESIZE _SC_LEVEL4_CACHE_LINESIZE
17513#define _SC_IPV6 _SC_IPV6
17514#define _SC_RAW_SOCKETS _SC_RAW_SOCKETS
17515#define _SC_V7_ILP32_OFF32 _SC_V7_ILP32_OFF32
17516#define _SC_V7_ILP32_OFFBIG _SC_V7_ILP32_OFFBIG
17517#define _SC_V7_LP64_OFF64 _SC_V7_LP64_OFF64
17518#define _SC_V7_LPBIG_OFFBIG _SC_V7_LPBIG_OFFBIG
17519#define _SC_SS_REPL_MAX _SC_SS_REPL_MAX
17520#define _SC_TRACE_EVENT_NAME_MAX _SC_TRACE_EVENT_NAME_MAX
17521#define _SC_TRACE_NAME_MAX _SC_TRACE_NAME_MAX
17522#define _SC_TRACE_SYS_MAX _SC_TRACE_SYS_MAX
17523#define _SC_TRACE_USER_EVENT_MAX _SC_TRACE_USER_EVENT_MAX
17524#define _SC_XOPEN_STREAMS _SC_XOPEN_STREAMS
17525#define _SC_THREAD_ROBUST_PRIO_INHERIT _SC_THREAD_ROBUST_PRIO_INHERIT
17526#define _SC_THREAD_ROBUST_PRIO_PROTECT _SC_THREAD_ROBUST_PRIO_PROTECT
17527#define _CS_PATH _CS_PATH
17528#define _CS_V6_WIDTH_RESTRICTED_ENVS _CS_V6_WIDTH_RESTRICTED_ENVS
17529#define _CS_POSIX_V6_WIDTH_RESTRICTED_ENVS _CS_V6_WIDTH_RESTRICTED_ENVS
17530#define _CS_GNU_LIBC_VERSION _CS_GNU_LIBC_VERSION
17531#define _CS_GNU_LIBPTHREAD_VERSION _CS_GNU_LIBPTHREAD_VERSION
17532#define _CS_V5_WIDTH_RESTRICTED_ENVS _CS_V5_WIDTH_RESTRICTED_ENVS
17533#define _CS_POSIX_V5_WIDTH_RESTRICTED_ENVS _CS_V5_WIDTH_RESTRICTED_ENVS
17534#define _CS_V7_WIDTH_RESTRICTED_ENVS _CS_V7_WIDTH_RESTRICTED_ENVS
17535#define _CS_POSIX_V7_WIDTH_RESTRICTED_ENVS _CS_V7_WIDTH_RESTRICTED_ENVS
17536#define _CS_LFS_CFLAGS _CS_LFS_CFLAGS
17537#define _CS_LFS_LDFLAGS _CS_LFS_LDFLAGS
17538#define _CS_LFS_LIBS _CS_LFS_LIBS
17539#define _CS_LFS_LINTFLAGS _CS_LFS_LINTFLAGS
17540#define _CS_LFS64_CFLAGS _CS_LFS64_CFLAGS
17541#define _CS_LFS64_LDFLAGS _CS_LFS64_LDFLAGS
17542#define _CS_LFS64_LIBS _CS_LFS64_LIBS
17543#define _CS_LFS64_LINTFLAGS _CS_LFS64_LINTFLAGS
17544#define _CS_XBS5_ILP32_OFF32_CFLAGS _CS_XBS5_ILP32_OFF32_CFLAGS
17545#define _CS_XBS5_ILP32_OFF32_LDFLAGS _CS_XBS5_ILP32_OFF32_LDFLAGS
17546#define _CS_XBS5_ILP32_OFF32_LIBS _CS_XBS5_ILP32_OFF32_LIBS
17547#define _CS_XBS5_ILP32_OFF32_LINTFLAGS _CS_XBS5_ILP32_OFF32_LINTFLAGS
17548#define _CS_XBS5_ILP32_OFFBIG_CFLAGS _CS_XBS5_ILP32_OFFBIG_CFLAGS
17549#define _CS_XBS5_ILP32_OFFBIG_LDFLAGS _CS_XBS5_ILP32_OFFBIG_LDFLAGS
17550#define _CS_XBS5_ILP32_OFFBIG_LIBS _CS_XBS5_ILP32_OFFBIG_LIBS
17551#define _CS_XBS5_ILP32_OFFBIG_LINTFLAGS _CS_XBS5_ILP32_OFFBIG_LINTFLAGS
17552#define _CS_XBS5_LP64_OFF64_CFLAGS _CS_XBS5_LP64_OFF64_CFLAGS
17553#define _CS_XBS5_LP64_OFF64_LDFLAGS _CS_XBS5_LP64_OFF64_LDFLAGS
17554#define _CS_XBS5_LP64_OFF64_LIBS _CS_XBS5_LP64_OFF64_LIBS
17555#define _CS_XBS5_LP64_OFF64_LINTFLAGS _CS_XBS5_LP64_OFF64_LINTFLAGS
17556#define _CS_XBS5_LPBIG_OFFBIG_CFLAGS _CS_XBS5_LPBIG_OFFBIG_CFLAGS
17557#define _CS_XBS5_LPBIG_OFFBIG_LDFLAGS _CS_XBS5_LPBIG_OFFBIG_LDFLAGS
17558#define _CS_XBS5_LPBIG_OFFBIG_LIBS _CS_XBS5_LPBIG_OFFBIG_LIBS
17559#define _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS
17560#define _CS_POSIX_V6_ILP32_OFF32_CFLAGS _CS_POSIX_V6_ILP32_OFF32_CFLAGS
17561#define _CS_POSIX_V6_ILP32_OFF32_LDFLAGS _CS_POSIX_V6_ILP32_OFF32_LDFLAGS
17562#define _CS_POSIX_V6_ILP32_OFF32_LIBS _CS_POSIX_V6_ILP32_OFF32_LIBS
17563#define _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS
17564#define _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS
17565#define _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS
17566#define _CS_POSIX_V6_ILP32_OFFBIG_LIBS _CS_POSIX_V6_ILP32_OFFBIG_LIBS
17567#define _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS
17568#define _CS_POSIX_V6_LP64_OFF64_CFLAGS _CS_POSIX_V6_LP64_OFF64_CFLAGS
17569#define _CS_POSIX_V6_LP64_OFF64_LDFLAGS _CS_POSIX_V6_LP64_OFF64_LDFLAGS
17570#define _CS_POSIX_V6_LP64_OFF64_LIBS _CS_POSIX_V6_LP64_OFF64_LIBS
17571#define _CS_POSIX_V6_LP64_OFF64_LINTFLAGS _CS_POSIX_V6_LP64_OFF64_LINTFLAGS
17572#define _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS
17573#define _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS
17574#define _CS_POSIX_V6_LPBIG_OFFBIG_LIBS _CS_POSIX_V6_LPBIG_OFFBIG_LIBS
17575#define _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS
17576#define _CS_POSIX_V7_ILP32_OFF32_CFLAGS _CS_POSIX_V7_ILP32_OFF32_CFLAGS
17577#define _CS_POSIX_V7_ILP32_OFF32_LDFLAGS _CS_POSIX_V7_ILP32_OFF32_LDFLAGS
17578#define _CS_POSIX_V7_ILP32_OFF32_LIBS _CS_POSIX_V7_ILP32_OFF32_LIBS
17579#define _CS_POSIX_V7_ILP32_OFF32_LINTFLAGS _CS_POSIX_V7_ILP32_OFF32_LINTFLAGS
17580#define _CS_POSIX_V7_ILP32_OFFBIG_CFLAGS _CS_POSIX_V7_ILP32_OFFBIG_CFLAGS
17581#define _CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS _CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS
17582#define _CS_POSIX_V7_ILP32_OFFBIG_LIBS _CS_POSIX_V7_ILP32_OFFBIG_LIBS
17583#define _CS_POSIX_V7_ILP32_OFFBIG_LINTFLAGS _CS_POSIX_V7_ILP32_OFFBIG_LINTFLAGS
17584#define _CS_POSIX_V7_LP64_OFF64_CFLAGS _CS_POSIX_V7_LP64_OFF64_CFLAGS
17585#define _CS_POSIX_V7_LP64_OFF64_LDFLAGS _CS_POSIX_V7_LP64_OFF64_LDFLAGS
17586#define _CS_POSIX_V7_LP64_OFF64_LIBS _CS_POSIX_V7_LP64_OFF64_LIBS
17587#define _CS_POSIX_V7_LP64_OFF64_LINTFLAGS _CS_POSIX_V7_LP64_OFF64_LINTFLAGS
17588#define _CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS _CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS
17589#define _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS
17590#define _CS_POSIX_V7_LPBIG_OFFBIG_LIBS _CS_POSIX_V7_LPBIG_OFFBIG_LIBS
17591#define _CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS _CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS
17592#define _CS_V6_ENV _CS_V6_ENV
17593#define _CS_V7_ENV _CS_V7_ENV
17594#define _GETOPT_POSIX_H 1
17595#define _GETOPT_CORE_H 1
17596#define F_ULOCK 0
17597#define F_LOCK 1
17598#define F_TLOCK 2
17599#define F_TEST 3
17600#define TEMP_FAILURE_RETRY(expression) (__extension__ ({ long int __result; do __result = (long int) (expression); while (__result == -1L && errno == EINTR); __result; }))
17601#define RUBY_MISSING_H 1
17602#define _MATH_H 1
17603#define __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION
17604#undef __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION
17605#undef __GLIBC_USE_LIB_EXT2
17606#define __GLIBC_USE_LIB_EXT2 1
17607#undef __GLIBC_USE_IEC_60559_BFP_EXT
17608#define __GLIBC_USE_IEC_60559_BFP_EXT 1
17609#undef __GLIBC_USE_IEC_60559_FUNCS_EXT
17610#define __GLIBC_USE_IEC_60559_FUNCS_EXT 1
17611#undef __GLIBC_USE_IEC_60559_TYPES_EXT
17612#define __GLIBC_USE_IEC_60559_TYPES_EXT 1
17613#define _BITS_LIBM_SIMD_DECL_STUBS_H 1
17614#define __DECL_SIMD_cos
17615#define __DECL_SIMD_cosf
17616#define __DECL_SIMD_cosl
17617#define __DECL_SIMD_cosf16
17618#define __DECL_SIMD_cosf32
17619#define __DECL_SIMD_cosf64
17620#define __DECL_SIMD_cosf128
17621#define __DECL_SIMD_cosf32x
17622#define __DECL_SIMD_cosf64x
17623#define __DECL_SIMD_cosf128x
17624#define __DECL_SIMD_sin
17625#define __DECL_SIMD_sinf
17626#define __DECL_SIMD_sinl
17627#define __DECL_SIMD_sinf16
17628#define __DECL_SIMD_sinf32
17629#define __DECL_SIMD_sinf64
17630#define __DECL_SIMD_sinf128
17631#define __DECL_SIMD_sinf32x
17632#define __DECL_SIMD_sinf64x
17633#define __DECL_SIMD_sinf128x
17634#define __DECL_SIMD_sincos
17635#define __DECL_SIMD_sincosf
17636#define __DECL_SIMD_sincosl
17637#define __DECL_SIMD_sincosf16
17638#define __DECL_SIMD_sincosf32
17639#define __DECL_SIMD_sincosf64
17640#define __DECL_SIMD_sincosf128
17641#define __DECL_SIMD_sincosf32x
17642#define __DECL_SIMD_sincosf64x
17643#define __DECL_SIMD_sincosf128x
17644#define __DECL_SIMD_log
17645#define __DECL_SIMD_logf
17646#define __DECL_SIMD_logl
17647#define __DECL_SIMD_logf16
17648#define __DECL_SIMD_logf32
17649#define __DECL_SIMD_logf64
17650#define __DECL_SIMD_logf128
17651#define __DECL_SIMD_logf32x
17652#define __DECL_SIMD_logf64x
17653#define __DECL_SIMD_logf128x
17654#define __DECL_SIMD_exp
17655#define __DECL_SIMD_expf
17656#define __DECL_SIMD_expl
17657#define __DECL_SIMD_expf16
17658#define __DECL_SIMD_expf32
17659#define __DECL_SIMD_expf64
17660#define __DECL_SIMD_expf128
17661#define __DECL_SIMD_expf32x
17662#define __DECL_SIMD_expf64x
17663#define __DECL_SIMD_expf128x
17664#define __DECL_SIMD_pow
17665#define __DECL_SIMD_powf
17666#define __DECL_SIMD_powl
17667#define __DECL_SIMD_powf16
17668#define __DECL_SIMD_powf32
17669#define __DECL_SIMD_powf64
17670#define __DECL_SIMD_powf128
17671#define __DECL_SIMD_powf32x
17672#define __DECL_SIMD_powf64x
17673#define __DECL_SIMD_powf128x
17674#define HUGE_VAL (__builtin_huge_val ())
17675#define HUGE_VALF (__builtin_huge_valf ())
17676#define HUGE_VALL (__builtin_huge_vall ())
17677#define HUGE_VAL_F32 (__builtin_huge_valf32 ())
17678#define HUGE_VAL_F64 (__builtin_huge_valf64 ())
17679#define HUGE_VAL_F128 (__builtin_huge_valf128 ())
17680#define HUGE_VAL_F32X (__builtin_huge_valf32x ())
17681#define HUGE_VAL_F64X (__builtin_huge_valf64x ())
17682#define INFINITY (__builtin_inff ())
17683#define NAN (__builtin_nanf (""))
17684#define SNANF (__builtin_nansf (""))
17685#define SNAN (__builtin_nans (""))
17686#define SNANL (__builtin_nansl (""))
17687#define SNANF32 (__builtin_nansf32 (""))
17688#define SNANF64 (__builtin_nansf64 (""))
17689#define SNANF128 (__builtin_nansf128 (""))
17690#define SNANF32X (__builtin_nansf32x (""))
17691#define SNANF64X (__builtin_nansf64x (""))
17692#define __GLIBC_FLT_EVAL_METHOD __FLT_EVAL_METHOD__
17693#define __FP_LOGB0_IS_MIN 1
17694#define __FP_LOGBNAN_IS_MIN 1
17695#define FP_ILOGB0 (-2147483647 - 1)
17696#define FP_ILOGBNAN (-2147483647 - 1)
17697#define __FP_LONG_MAX 0x7fffffffffffffffL
17698#define FP_LLOGB0 (-__FP_LONG_MAX - 1)
17699#define FP_LLOGBNAN (-__FP_LONG_MAX - 1)
17700#define FP_INT_UPWARD 0
17701#define FP_INT_DOWNWARD 1
17702#define FP_INT_TOWARDZERO 2
17703#define FP_INT_TONEARESTFROMZERO 3
17704#define FP_INT_TONEAREST 4
17705#define __SIMD_DECL(function) __CONCAT (__DECL_SIMD_, function)
17706#define __MATHCALL_VEC(function,suffix,args) __SIMD_DECL (__MATH_PRECNAME (function, suffix)) __MATHCALL (function, suffix, args)
17707#define __MATHDECL_VEC(type,function,suffix,args) __SIMD_DECL (__MATH_PRECNAME (function, suffix)) __MATHDECL(type, function,suffix, args)
17708#define __MATHCALL(function,suffix,args) __MATHDECL (_Mdouble_,function,suffix, args)
17709#define __MATHDECL(type,function,suffix,args) __MATHDECL_1(type, function,suffix, args); __MATHDECL_1(type, __CONCAT(__,function),suffix, args)
17710#define __MATHCALLX(function,suffix,args,attrib) __MATHDECLX (_Mdouble_,function,suffix, args, attrib)
17711#define __MATHDECLX(type,function,suffix,args,attrib) __MATHDECL_1(type, function,suffix, args) __attribute__ (attrib); __MATHDECL_1(type, __CONCAT(__,function),suffix, args) __attribute__ (attrib)
17712#define __MATHDECL_1(type,function,suffix,args) extern type __MATH_PRECNAME(function,suffix) args __THROW
17713#define _Mdouble_ double
17714#define __MATH_PRECNAME(name,r) __CONCAT(name,r)
17715#define __MATH_DECLARING_DOUBLE 1
17716#define __MATH_DECLARING_FLOATN 0
17717#undef _Mdouble_
17718#undef __MATH_PRECNAME
17719#undef __MATH_DECLARING_DOUBLE
17720#undef __MATH_DECLARING_FLOATN
17721#define _Mdouble_ float
17722#define __MATH_PRECNAME(name,r) name ##f ##r
17723#define __MATH_DECLARING_DOUBLE 0
17724#define __MATH_DECLARING_FLOATN 0
17725#undef _Mdouble_
17726#undef __MATH_PRECNAME
17727#undef __MATH_DECLARING_DOUBLE
17728#undef __MATH_DECLARING_FLOATN
17729#define _Mdouble_ long double
17730#define __MATH_PRECNAME(name,r) name ##l ##r
17731#define __MATH_DECLARING_DOUBLE 0
17732#define __MATH_DECLARING_FLOATN 0
17733#define __MATH_DECLARE_LDOUBLE 1
17734#undef _Mdouble_
17735#undef __MATH_PRECNAME
17736#undef __MATH_DECLARING_DOUBLE
17737#undef __MATH_DECLARING_FLOATN
17738#define _Mdouble_ _Float32
17739#define __MATH_PRECNAME(name,r) name ##f32 ##r
17740#define __MATH_DECLARING_DOUBLE 0
17741#define __MATH_DECLARING_FLOATN 1
17742#undef _Mdouble_
17743#undef __MATH_PRECNAME
17744#undef __MATH_DECLARING_DOUBLE
17745#undef __MATH_DECLARING_FLOATN
17746#define _Mdouble_ _Float64
17747#define __MATH_PRECNAME(name,r) name ##f64 ##r
17748#define __MATH_DECLARING_DOUBLE 0
17749#define __MATH_DECLARING_FLOATN 1
17750#undef _Mdouble_
17751#undef __MATH_PRECNAME
17752#undef __MATH_DECLARING_DOUBLE
17753#undef __MATH_DECLARING_FLOATN
17754#define _Mdouble_ _Float128
17755#define __MATH_PRECNAME(name,r) name ##f128 ##r
17756#define __MATH_DECLARING_DOUBLE 0
17757#define __MATH_DECLARING_FLOATN 1
17758#undef _Mdouble_
17759#undef __MATH_PRECNAME
17760#undef __MATH_DECLARING_DOUBLE
17761#undef __MATH_DECLARING_FLOATN
17762#define _Mdouble_ _Float32x
17763#define __MATH_PRECNAME(name,r) name ##f32x ##r
17764#define __MATH_DECLARING_DOUBLE 0
17765#define __MATH_DECLARING_FLOATN 1
17766#undef _Mdouble_
17767#undef __MATH_PRECNAME
17768#undef __MATH_DECLARING_DOUBLE
17769#undef __MATH_DECLARING_FLOATN
17770#define _Mdouble_ _Float64x
17771#define __MATH_PRECNAME(name,r) name ##f64x ##r
17772#define __MATH_DECLARING_DOUBLE 0
17773#define __MATH_DECLARING_FLOATN 1
17774#undef _Mdouble_
17775#undef __MATH_PRECNAME
17776#undef __MATH_DECLARING_DOUBLE
17777#undef __MATH_DECLARING_FLOATN
17778#undef __MATHDECL_1
17779#undef __MATHDECL
17780#undef __MATHCALL
17781#define __MATHCALL_NARROW_ARGS_1 (_Marg_ __x)
17782#define __MATHCALL_NARROW_ARGS_2 (_Marg_ __x, _Marg_ __y)
17783#define __MATHCALL_NARROW_ARGS_3 (_Marg_ __x, _Marg_ __y, _Marg_ __z)
17784#define __MATHCALL_NARROW_NORMAL(func,nargs) extern _Mret_ func __MATHCALL_NARROW_ARGS_ ## nargs __THROW
17785#define __MATHCALL_NARROW_REDIR(func,redir,nargs) extern _Mret_ __REDIRECT_NTH (func, __MATHCALL_NARROW_ARGS_ ## nargs, redir)
17786#define __MATHCALL_NARROW(func,redir,nargs) __MATHCALL_NARROW_NORMAL (func, nargs)
17787#define _Mret_ float
17788#define _Marg_ double
17789#define __MATHCALL_NAME(name) f ## name
17790#undef _Mret_
17791#undef _Marg_
17792#undef __MATHCALL_NAME
17793#define _Mret_ float
17794#define _Marg_ long double
17795#define __MATHCALL_NAME(name) f ## name ## l
17796#undef _Mret_
17797#undef _Marg_
17798#undef __MATHCALL_NAME
17799#define _Mret_ double
17800#define _Marg_ long double
17801#define __MATHCALL_NAME(name) d ## name ## l
17802#undef _Mret_
17803#undef _Marg_
17804#undef __MATHCALL_NAME
17805#define _Mret_ _Float32
17806#define _Marg_ _Float32x
17807#define __MATHCALL_NAME(name) f32 ## name ## f32x
17808#undef _Mret_
17809#undef _Marg_
17810#undef __MATHCALL_NAME
17811#define _Mret_ _Float32
17812#define _Marg_ _Float64
17813#define __MATHCALL_NAME(name) f32 ## name ## f64
17814#undef _Mret_
17815#undef _Marg_
17816#undef __MATHCALL_NAME
17817#define _Mret_ _Float32
17818#define _Marg_ _Float64x
17819#define __MATHCALL_NAME(name) f32 ## name ## f64x
17820#undef _Mret_
17821#undef _Marg_
17822#undef __MATHCALL_NAME
17823#define _Mret_ _Float32
17824#define _Marg_ _Float128
17825#define __MATHCALL_NAME(name) f32 ## name ## f128
17826#undef _Mret_
17827#undef _Marg_
17828#undef __MATHCALL_NAME
17829#define _Mret_ _Float32x
17830#define _Marg_ _Float64
17831#define __MATHCALL_NAME(name) f32x ## name ## f64
17832#undef _Mret_
17833#undef _Marg_
17834#undef __MATHCALL_NAME
17835#define _Mret_ _Float32x
17836#define _Marg_ _Float64x
17837#define __MATHCALL_NAME(name) f32x ## name ## f64x
17838#undef _Mret_
17839#undef _Marg_
17840#undef __MATHCALL_NAME
17841#define _Mret_ _Float32x
17842#define _Marg_ _Float128
17843#define __MATHCALL_NAME(name) f32x ## name ## f128
17844#undef _Mret_
17845#undef _Marg_
17846#undef __MATHCALL_NAME
17847#define _Mret_ _Float64
17848#define _Marg_ _Float64x
17849#define __MATHCALL_NAME(name) f64 ## name ## f64x
17850#undef _Mret_
17851#undef _Marg_
17852#undef __MATHCALL_NAME
17853#define _Mret_ _Float64
17854#define _Marg_ _Float128
17855#define __MATHCALL_NAME(name) f64 ## name ## f128
17856#undef _Mret_
17857#undef _Marg_
17858#undef __MATHCALL_NAME
17859#define _Mret_ _Float64x
17860#define _Marg_ _Float128
17861#define __MATHCALL_NAME(name) f64x ## name ## f128
17862#undef _Mret_
17863#undef _Marg_
17864#undef __MATHCALL_NAME
17865#undef __MATHCALL_NARROW_ARGS_1
17866#undef __MATHCALL_NARROW_ARGS_2
17867#undef __MATHCALL_NARROW_ARGS_3
17868#undef __MATHCALL_NARROW_NORMAL
17869#undef __MATHCALL_NARROW_REDIR
17870#undef __MATHCALL_NARROW
17871#define __MATH_TG_F32(FUNC,ARGS) _Float32: FUNC ## f ARGS,
17872#define __MATH_TG_F64X(FUNC,ARGS) _Float64x: FUNC ## l ARGS,
17873#define __MATH_TG(TG_ARG,FUNC,ARGS) _Generic ((TG_ARG), float: FUNC ## f ARGS, __MATH_TG_F32 (FUNC, ARGS) default: FUNC ARGS, long double: FUNC ## l ARGS, __MATH_TG_F64X (FUNC, ARGS) _Float128: FUNC ## f128 ARGS)
17874#define FP_NAN 0
17875#define FP_INFINITE 1
17876#define FP_ZERO 2
17877#define FP_SUBNORMAL 3
17878#define FP_NORMAL 4
17879#define fpclassify(x) __builtin_fpclassify (FP_NAN, FP_INFINITE, FP_NORMAL, FP_SUBNORMAL, FP_ZERO, x)
17880#define signbit(x) __builtin_signbit (x)
17881#define isfinite(x) __builtin_isfinite (x)
17882#define isnormal(x) __builtin_isnormal (x)
17883#define isnan(x) __builtin_isnan (x)
17884#define isinf(x) __builtin_isinf_sign (x)
17885#define MATH_ERRNO 1
17886#define MATH_ERREXCEPT 2
17887#define math_errhandling (MATH_ERRNO | MATH_ERREXCEPT)
17888#define __iscanonicalf(x) ((void) (__typeof (x)) (x), 1)
17889#define __iscanonical(x) ((void) (__typeof (x)) (x), 1)
17890#define __iscanonicalf128(x) ((void) (__typeof (x)) (x), 1)
17891#define iscanonical(x) __MATH_TG ((x), __iscanonical, (x))
17892#define issignaling(x) __MATH_TG ((x), __issignaling, (x))
17893#define issubnormal(x) (fpclassify (x) == FP_SUBNORMAL)
17894#define iszero(x) (((__typeof (x)) (x)) == 0)
17895#define MAXFLOAT 3.40282347e+38F
17896#define M_E 2.7182818284590452354
17897#define M_LOG2E 1.4426950408889634074
17898#define M_LOG10E 0.43429448190325182765
17899#define M_LN2 0.69314718055994530942
17900#define M_LN10 2.30258509299404568402
17901#define M_PI 3.14159265358979323846
17902#define M_PI_2 1.57079632679489661923
17903#define M_PI_4 0.78539816339744830962
17904#define M_1_PI 0.31830988618379067154
17905#define M_2_PI 0.63661977236758134308
17906#define M_2_SQRTPI 1.12837916709551257390
17907#define M_SQRT2 1.41421356237309504880
17908#define M_SQRT1_2 0.70710678118654752440
17909#define M_El 2.718281828459045235360287471352662498L
17910#define M_LOG2El 1.442695040888963407359924681001892137L
17911#define M_LOG10El 0.434294481903251827651128918916605082L
17912#define M_LN2l 0.693147180559945309417232121458176568L
17913#define M_LN10l 2.302585092994045684017991454684364208L
17914#define M_PIl 3.141592653589793238462643383279502884L
17915#define M_PI_2l 1.570796326794896619231321691639751442L
17916#define M_PI_4l 0.785398163397448309615660845819875721L
17917#define M_1_PIl 0.318309886183790671537767526745028724L
17918#define M_2_PIl 0.636619772367581343075535053490057448L
17919#define M_2_SQRTPIl 1.128379167095512573896158903121545172L
17920#define M_SQRT2l 1.414213562373095048801688724209698079L
17921#define M_SQRT1_2l 0.707106781186547524400844362104849039L
17922#define M_Ef32 __f32 (2.718281828459045235360287471352662498)
17923#define M_LOG2Ef32 __f32 (1.442695040888963407359924681001892137)
17924#define M_LOG10Ef32 __f32 (0.434294481903251827651128918916605082)
17925#define M_LN2f32 __f32 (0.693147180559945309417232121458176568)
17926#define M_LN10f32 __f32 (2.302585092994045684017991454684364208)
17927#define M_PIf32 __f32 (3.141592653589793238462643383279502884)
17928#define M_PI_2f32 __f32 (1.570796326794896619231321691639751442)
17929#define M_PI_4f32 __f32 (0.785398163397448309615660845819875721)
17930#define M_1_PIf32 __f32 (0.318309886183790671537767526745028724)
17931#define M_2_PIf32 __f32 (0.636619772367581343075535053490057448)
17932#define M_2_SQRTPIf32 __f32 (1.128379167095512573896158903121545172)
17933#define M_SQRT2f32 __f32 (1.414213562373095048801688724209698079)
17934#define M_SQRT1_2f32 __f32 (0.707106781186547524400844362104849039)
17935#define M_Ef64 __f64 (2.718281828459045235360287471352662498)
17936#define M_LOG2Ef64 __f64 (1.442695040888963407359924681001892137)
17937#define M_LOG10Ef64 __f64 (0.434294481903251827651128918916605082)
17938#define M_LN2f64 __f64 (0.693147180559945309417232121458176568)
17939#define M_LN10f64 __f64 (2.302585092994045684017991454684364208)
17940#define M_PIf64 __f64 (3.141592653589793238462643383279502884)
17941#define M_PI_2f64 __f64 (1.570796326794896619231321691639751442)
17942#define M_PI_4f64 __f64 (0.785398163397448309615660845819875721)
17943#define M_1_PIf64 __f64 (0.318309886183790671537767526745028724)
17944#define M_2_PIf64 __f64 (0.636619772367581343075535053490057448)
17945#define M_2_SQRTPIf64 __f64 (1.128379167095512573896158903121545172)
17946#define M_SQRT2f64 __f64 (1.414213562373095048801688724209698079)
17947#define M_SQRT1_2f64 __f64 (0.707106781186547524400844362104849039)
17948#define M_Ef128 __f128 (2.718281828459045235360287471352662498)
17949#define M_LOG2Ef128 __f128 (1.442695040888963407359924681001892137)
17950#define M_LOG10Ef128 __f128 (0.434294481903251827651128918916605082)
17951#define M_LN2f128 __f128 (0.693147180559945309417232121458176568)
17952#define M_LN10f128 __f128 (2.302585092994045684017991454684364208)
17953#define M_PIf128 __f128 (3.141592653589793238462643383279502884)
17954#define M_PI_2f128 __f128 (1.570796326794896619231321691639751442)
17955#define M_PI_4f128 __f128 (0.785398163397448309615660845819875721)
17956#define M_1_PIf128 __f128 (0.318309886183790671537767526745028724)
17957#define M_2_PIf128 __f128 (0.636619772367581343075535053490057448)
17958#define M_2_SQRTPIf128 __f128 (1.128379167095512573896158903121545172)
17959#define M_SQRT2f128 __f128 (1.414213562373095048801688724209698079)
17960#define M_SQRT1_2f128 __f128 (0.707106781186547524400844362104849039)
17961#define M_Ef32x __f32x (2.718281828459045235360287471352662498)
17962#define M_LOG2Ef32x __f32x (1.442695040888963407359924681001892137)
17963#define M_LOG10Ef32x __f32x (0.434294481903251827651128918916605082)
17964#define M_LN2f32x __f32x (0.693147180559945309417232121458176568)
17965#define M_LN10f32x __f32x (2.302585092994045684017991454684364208)
17966#define M_PIf32x __f32x (3.141592653589793238462643383279502884)
17967#define M_PI_2f32x __f32x (1.570796326794896619231321691639751442)
17968#define M_PI_4f32x __f32x (0.785398163397448309615660845819875721)
17969#define M_1_PIf32x __f32x (0.318309886183790671537767526745028724)
17970#define M_2_PIf32x __f32x (0.636619772367581343075535053490057448)
17971#define M_2_SQRTPIf32x __f32x (1.128379167095512573896158903121545172)
17972#define M_SQRT2f32x __f32x (1.414213562373095048801688724209698079)
17973#define M_SQRT1_2f32x __f32x (0.707106781186547524400844362104849039)
17974#define M_Ef64x __f64x (2.718281828459045235360287471352662498)
17975#define M_LOG2Ef64x __f64x (1.442695040888963407359924681001892137)
17976#define M_LOG10Ef64x __f64x (0.434294481903251827651128918916605082)
17977#define M_LN2f64x __f64x (0.693147180559945309417232121458176568)
17978#define M_LN10f64x __f64x (2.302585092994045684017991454684364208)
17979#define M_PIf64x __f64x (3.141592653589793238462643383279502884)
17980#define M_PI_2f64x __f64x (1.570796326794896619231321691639751442)
17981#define M_PI_4f64x __f64x (0.785398163397448309615660845819875721)
17982#define M_1_PIf64x __f64x (0.318309886183790671537767526745028724)
17983#define M_2_PIf64x __f64x (0.636619772367581343075535053490057448)
17984#define M_2_SQRTPIf64x __f64x (1.128379167095512573896158903121545172)
17985#define M_SQRT2f64x __f64x (1.414213562373095048801688724209698079)
17986#define M_SQRT1_2f64x __f64x (0.707106781186547524400844362104849039)
17987#define isgreater(x,y) __builtin_isgreater(x, y)
17988#define isgreaterequal(x,y) __builtin_isgreaterequal(x, y)
17989#define isless(x,y) __builtin_isless(x, y)
17990#define islessequal(x,y) __builtin_islessequal(x, y)
17991#define islessgreater(x,y) __builtin_islessgreater(x, y)
17992#define isunordered(x,y) __builtin_isunordered(x, y)
17993#define __MATH_EVAL_FMT2(x,y) ((x) + (y) + 0.0f)
17994#define iseqsig(x,y) __MATH_TG (__MATH_EVAL_FMT2 (x, y), __iseqsig, ((x), (y)))
17995#undef RUBY_EXTERN
17996#define RUBY_EXTERN extern
17997#pragma GCC visibility push(default)
17998#pragma GCC visibility pop
17999#define RUBY
18000#undef _
18001#define _(args) args
18002#undef __
18003#define __(args) args
18004#define ANYARGS
18005#pragma GCC visibility push(default)
18006#define xmalloc ruby_xmalloc
18007#define xmalloc2 ruby_xmalloc2
18008#define xcalloc ruby_xcalloc
18009#define xrealloc ruby_xrealloc
18010#define xrealloc2 ruby_xrealloc2
18011#define xfree ruby_xfree
18012#define RUBY_ATTR_ALLOC_SIZE(params) __attribute__ ((alloc_size params))
18013#define RUBY_ATTR_MALLOC __attribute__((__malloc__))
18014#define RUBY_ATTR_RETURNS_NONNULL __attribute__((__returns_nonnull__))
18015#define USE_GC_MALLOC_OBJ_INFO_DETAILS 0
18016#define STRINGIZE(expr) STRINGIZE0(expr)
18017#define STRINGIZE0(expr) #expr
18018#define HAVE_TRUE_LONG_LONG 1
18019#define LONG_LONG long long
18020#undef RUBY_EXTERN
18021#define FALSE 0
18022#define TRUE 1
18023#define MJIT_FUNC_EXPORTED RUBY_FUNC_EXPORTED
18024#define MJIT_SYMBOL_EXPORT_BEGIN RUBY_SYMBOL_EXPORT_BEGIN
18025#define MJIT_SYMBOL_EXPORT_END RUBY_SYMBOL_EXPORT_END
18026#define RUBY_EXTERN extern
18027#define EXTERN _Pragma("message \"EXTERN is deprecated, use RUBY_EXTERN instead\""); RUBY_EXTERN
18028#define RUBY_MBCHAR_MAXSIZE INT_MAX
18029#define FLUSH_REGISTER_WINDOWS ((void)0)
18030#define PATH_SEP ":"
18031#define PATH_SEP_CHAR PATH_SEP[0]
18032#define PATH_ENV "PATH"
18033#define CASEFOLD_FILESYSTEM 0
18034#define RUBY_ALIAS_FUNCTION(prot,name,args) RUBY_ALIAS_FUNCTION_TYPE(VALUE, prot, name, args)
18035#define UNALIGNED_WORD_ACCESS 1
18036#define PACKED_STRUCT_UNALIGNED(x) PACKED_STRUCT(x)
18037#define NORETURN_STYLE_NEW 1
18038#pragma GCC visibility pop
18039#define RUBY_ASSERT_H
18040#define RUBY_ASSERT_FAIL(expr) rb_assert_failure(__FILE__, __LINE__, RUBY_FUNCTION_NAME_STRING, expr)
18041#define RUBY_ASSERT_MESG(expr,mesg) ((expr) ? (void)0 : RUBY_ASSERT_FAIL(mesg))
18042#define RUBY_ASSERT_MESG_WHEN(cond,expr,mesg) ((RUBY_DEBUG+0) ? RUBY_ASSERT_MESG((expr), mesg) : __builtin_choose_expr( __builtin_constant_p(cond), __builtin_choose_expr(cond, RUBY_ASSERT_MESG(expr, mesg), (void)0), RUBY_ASSERT_MESG(!(cond) || (expr), mesg)))
18043#define RUBY_ASSERT(expr) RUBY_ASSERT_MESG_WHEN((!RUBY_NDEBUG+0), expr, #expr)
18044#define RUBY_ASSERT_WHEN(cond,expr) RUBY_ASSERT_MESG_WHEN(cond, expr, #expr)
18045#define RUBY_ASSERT_ALWAYS(expr) RUBY_ASSERT_MESG_WHEN(TRUE, expr, #expr)
18046#define RUBY_DEBUG 0
18047#define RUBY_NDEBUG 0
18048#define ASSUME(x) (RB_LIKELY(!!(x)) ? (void)0 : UNREACHABLE)
18049#define UNREACHABLE_RETURN(val) UNREACHABLE
18050#define RUBY_MACRO_SELECT(base,n) TOKEN_PASTE(base, n)
18051#define _STDARG_H
18052#define _ANSI_STDARG_H_
18053#undef __need___va_list
18054#define va_start(v,l) __builtin_va_start(v,l)
18055#define va_end(v) __builtin_va_end(v)
18056#define va_arg(v,l) __builtin_va_arg(v,l)
18057#define va_copy(d,s) __builtin_va_copy(d,s)
18058#define __va_copy(d,s) __builtin_va_copy(d,s)
18059#define _VA_LIST_
18060#define _VA_LIST
18061#define _VA_LIST_T_H
18062#define __va_list__
18063#pragma GCC visibility push(default)
18064#define SIGNED_VALUE long
18065#define SIZEOF_VALUE SIZEOF_LONG
18066#define PRI_VALUE_PREFIX "l"
18067#define PRI_INT_PREFIX ""
18068#define PRI_LONG_PREFIX "l"
18069#define PRI_SHORT_PREFIX "h"
18070#define PRI_64_PREFIX PRI_LONG_PREFIX
18071#define RUBY_PRI_VALUE_MARK "\v"
18072#define PRIdVALUE PRI_VALUE_PREFIX"d"
18073#define PRIoVALUE PRI_VALUE_PREFIX"o"
18074#define PRIuVALUE PRI_VALUE_PREFIX"u"
18075#define PRIxVALUE PRI_VALUE_PREFIX"x"
18076#define PRIXVALUE PRI_VALUE_PREFIX"X"
18077#define PRIsVALUE PRI_VALUE_PREFIX"i" RUBY_PRI_VALUE_MARK
18078#define PRIdPTRDIFF PRI_PTRDIFF_PREFIX"d"
18079#define PRIiPTRDIFF PRI_PTRDIFF_PREFIX"i"
18080#define PRIoPTRDIFF PRI_PTRDIFF_PREFIX"o"
18081#define PRIuPTRDIFF PRI_PTRDIFF_PREFIX"u"
18082#define PRIxPTRDIFF PRI_PTRDIFF_PREFIX"x"
18083#define PRIXPTRDIFF PRI_PTRDIFF_PREFIX"X"
18084#define PRIdSIZE PRI_SIZE_PREFIX"d"
18085#define PRIiSIZE PRI_SIZE_PREFIX"i"
18086#define PRIoSIZE PRI_SIZE_PREFIX"o"
18087#define PRIuSIZE PRI_SIZE_PREFIX"u"
18088#define PRIxSIZE PRI_SIZE_PREFIX"x"
18089#define PRIXSIZE PRI_SIZE_PREFIX"X"
18090#define _GCC_LIMITS_H_
18091#define _GCC_NEXT_LIMITS_H
18092#define _LIBC_LIMITS_H_ 1
18093#define __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION
18094#undef __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION
18095#undef __GLIBC_USE_LIB_EXT2
18096#define __GLIBC_USE_LIB_EXT2 1
18097#undef __GLIBC_USE_IEC_60559_BFP_EXT
18098#define __GLIBC_USE_IEC_60559_BFP_EXT 1
18099#undef __GLIBC_USE_IEC_60559_FUNCS_EXT
18100#define __GLIBC_USE_IEC_60559_FUNCS_EXT 1
18101#undef __GLIBC_USE_IEC_60559_TYPES_EXT
18102#define __GLIBC_USE_IEC_60559_TYPES_EXT 1
18103#define MB_LEN_MAX 16
18104#define LLONG_MIN (-LLONG_MAX-1)
18105#define LLONG_MAX __LONG_LONG_MAX__
18106#define ULLONG_MAX (LLONG_MAX * 2ULL + 1)
18107#define CHAR_WIDTH 8
18108#define SCHAR_WIDTH 8
18109#define UCHAR_WIDTH 8
18110#define SHRT_WIDTH 16
18111#define USHRT_WIDTH 16
18112#define INT_WIDTH 32
18113#define UINT_WIDTH 32
18114#define LONG_WIDTH __WORDSIZE
18115#define ULONG_WIDTH __WORDSIZE
18116#define LLONG_WIDTH 64
18117#define ULLONG_WIDTH 64
18118#define _BITS_POSIX1_LIM_H 1
18119#define __WORDSIZE 64
18120#define __WORDSIZE_TIME64_COMPAT32 1
18121#define __SYSCALL_WORDSIZE 64
18122#define _POSIX_AIO_LISTIO_MAX 2
18123#define _POSIX_AIO_MAX 1
18124#define _POSIX_ARG_MAX 4096
18125#define _POSIX_CHILD_MAX 25
18126#define _POSIX_DELAYTIMER_MAX 32
18127#define _POSIX_HOST_NAME_MAX 255
18128#define _POSIX_LINK_MAX 8
18129#define _POSIX_LOGIN_NAME_MAX 9
18130#define _POSIX_MAX_CANON 255
18131#define _POSIX_MAX_INPUT 255
18132#define _POSIX_MQ_OPEN_MAX 8
18133#define _POSIX_MQ_PRIO_MAX 32
18134#define _POSIX_NAME_MAX 14
18135#define _POSIX_NGROUPS_MAX 8
18136#define _POSIX_OPEN_MAX 20
18137#define _POSIX_FD_SETSIZE _POSIX_OPEN_MAX
18138#define _POSIX_PATH_MAX 256
18139#define _POSIX_PIPE_BUF 512
18140#define _POSIX_RE_DUP_MAX 255
18141#define _POSIX_RTSIG_MAX 8
18142#define _POSIX_SEM_NSEMS_MAX 256
18143#define _POSIX_SEM_VALUE_MAX 32767
18144#define _POSIX_SIGQUEUE_MAX 32
18145#define _POSIX_SSIZE_MAX 32767
18146#define _POSIX_STREAM_MAX 8
18147#define _POSIX_SYMLINK_MAX 255
18148#define _POSIX_SYMLOOP_MAX 8
18149#define _POSIX_TIMER_MAX 32
18150#define _POSIX_TTY_NAME_MAX 9
18151#define _POSIX_TZNAME_MAX 6
18152#define _POSIX_QLIMIT 1
18153#define _POSIX_HIWAT _POSIX_PIPE_BUF
18154#define _POSIX_UIO_MAXIOV 16
18155#define _POSIX_CLOCKRES_MIN 20000000
18156#define __undef_NR_OPEN
18157#define __undef_LINK_MAX
18158#define __undef_OPEN_MAX
18159#define __undef_ARG_MAX
18160#define _LINUX_LIMITS_H
18161#define NR_OPEN 1024
18162#define NGROUPS_MAX 65536
18163#define ARG_MAX 131072
18164#define LINK_MAX 127
18165#define MAX_CANON 255
18166#define MAX_INPUT 255
18167#define NAME_MAX 255
18168#define PATH_MAX 4096
18169#define PIPE_BUF 4096
18170#define XATTR_NAME_MAX 255
18171#define XATTR_SIZE_MAX 65536
18172#define XATTR_LIST_MAX 65536
18173#define RTSIG_MAX 32
18174#undef NR_OPEN
18175#undef __undef_NR_OPEN
18176#undef LINK_MAX
18177#undef __undef_LINK_MAX
18178#undef OPEN_MAX
18179#undef __undef_OPEN_MAX
18180#undef ARG_MAX
18181#undef __undef_ARG_MAX
18182#define _POSIX_THREAD_KEYS_MAX 128
18183#define PTHREAD_KEYS_MAX 1024
18184#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4
18185#define PTHREAD_DESTRUCTOR_ITERATIONS _POSIX_THREAD_DESTRUCTOR_ITERATIONS
18186#define _POSIX_THREAD_THREADS_MAX 64
18187#undef PTHREAD_THREADS_MAX
18188#define AIO_PRIO_DELTA_MAX 20
18189#define PTHREAD_STACK_MIN 16384
18190#define DELAYTIMER_MAX 2147483647
18191#define TTY_NAME_MAX 32
18192#define LOGIN_NAME_MAX 256
18193#define HOST_NAME_MAX 64
18194#define MQ_PRIO_MAX 32768
18195#define SEM_VALUE_MAX (2147483647)
18196#define SSIZE_MAX LONG_MAX
18197#define _BITS_POSIX2_LIM_H 1
18198#define _POSIX2_BC_BASE_MAX 99
18199#define _POSIX2_BC_DIM_MAX 2048
18200#define _POSIX2_BC_SCALE_MAX 99
18201#define _POSIX2_BC_STRING_MAX 1000
18202#define _POSIX2_COLL_WEIGHTS_MAX 2
18203#define _POSIX2_EXPR_NEST_MAX 32
18204#define _POSIX2_LINE_MAX 2048
18205#define _POSIX2_RE_DUP_MAX 255
18206#define _POSIX2_CHARCLASS_NAME_MAX 14
18207#define BC_BASE_MAX _POSIX2_BC_BASE_MAX
18208#define BC_DIM_MAX _POSIX2_BC_DIM_MAX
18209#define BC_SCALE_MAX _POSIX2_BC_SCALE_MAX
18210#define BC_STRING_MAX _POSIX2_BC_STRING_MAX
18211#define COLL_WEIGHTS_MAX 255
18212#define EXPR_NEST_MAX _POSIX2_EXPR_NEST_MAX
18213#define LINE_MAX _POSIX2_LINE_MAX
18214#define CHARCLASS_NAME_MAX 2048
18215#define RE_DUP_MAX (0x7fff)
18216#define _XOPEN_LIM_H 1
18217#define _XOPEN_IOV_MAX _POSIX_UIO_MAXIOV
18218#define _BITS_UIO_LIM_H 1
18219#define __IOV_MAX 1024
18220#define IOV_MAX __IOV_MAX
18221#define NL_ARGMAX _POSIX_ARG_MAX
18222#define NL_LANGMAX _POSIX2_LINE_MAX
18223#define NL_MSGMAX INT_MAX
18224#define NL_NMAX INT_MAX
18225#define NL_SETMAX INT_MAX
18226#define NL_TEXTMAX INT_MAX
18227#define NZERO 20
18228#define WORD_BIT 32
18229#define LONG_BIT 64
18230#undef _GCC_NEXT_LIMITS_H
18231#define _LIMITS_H___
18232#undef CHAR_BIT
18233#define CHAR_BIT __CHAR_BIT__
18234#undef SCHAR_MIN
18235#define SCHAR_MIN (-SCHAR_MAX - 1)
18236#undef SCHAR_MAX
18237#define SCHAR_MAX __SCHAR_MAX__
18238#undef UCHAR_MAX
18239#define UCHAR_MAX (SCHAR_MAX * 2 + 1)
18240#undef CHAR_MIN
18241#define CHAR_MIN SCHAR_MIN
18242#undef CHAR_MAX
18243#define CHAR_MAX SCHAR_MAX
18244#undef SHRT_MIN
18245#define SHRT_MIN (-SHRT_MAX - 1)
18246#undef SHRT_MAX
18247#define SHRT_MAX __SHRT_MAX__
18248#undef USHRT_MAX
18249#define USHRT_MAX (SHRT_MAX * 2 + 1)
18250#undef INT_MIN
18251#define INT_MIN (-INT_MAX - 1)
18252#undef INT_MAX
18253#define INT_MAX __INT_MAX__
18254#undef UINT_MAX
18255#define UINT_MAX (INT_MAX * 2U + 1U)
18256#undef LONG_MIN
18257#define LONG_MIN (-LONG_MAX - 1L)
18258#undef LONG_MAX
18259#define LONG_MAX __LONG_MAX__
18260#undef ULONG_MAX
18261#define ULONG_MAX (LONG_MAX * 2UL + 1UL)
18262#undef LLONG_MIN
18263#define LLONG_MIN (-LLONG_MAX - 1LL)
18264#undef LLONG_MAX
18265#define LLONG_MAX __LONG_LONG_MAX__
18266#undef ULLONG_MAX
18267#define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL)
18268#undef LONG_LONG_MIN
18269#define LONG_LONG_MIN (-LONG_LONG_MAX - 1LL)
18270#undef LONG_LONG_MAX
18271#define LONG_LONG_MAX __LONG_LONG_MAX__
18272#undef ULONG_LONG_MAX
18273#define ULONG_LONG_MAX (LONG_LONG_MAX * 2ULL + 1ULL)
18274#define RUBY_FIXNUM_MAX (LONG_MAX>>1)
18275#define RUBY_FIXNUM_MIN RSHIFT((long)LONG_MIN,1)
18276#define FIXNUM_MAX RUBY_FIXNUM_MAX
18277#define FIXNUM_MIN RUBY_FIXNUM_MIN
18278#define RB_INT2FIX(i) (((VALUE)(i))<<1 | RUBY_FIXNUM_FLAG)
18279#define INT2FIX(i) RB_INT2FIX(i)
18280#define RB_LONG2FIX(i) RB_INT2FIX(i)
18281#define LONG2FIX(i) RB_INT2FIX(i)
18282#define rb_fix_new(v) RB_INT2FIX(v)
18283#define rb_int_new(v) rb_int2inum(v)
18284#define rb_uint_new(v) rb_uint2inum(v)
18285#define LL2NUM(v) rb_ll2inum(v)
18286#define ULL2NUM(v) rb_ull2inum(v)
18287#define SIZET2NUM(v) ULONG2NUM(v)
18288#define SSIZET2NUM(v) LONG2NUM(v)
18289#define rb_long2int(n) rb_long2int_inline(n)
18290#define RB_FIX2LONG(x) ((long)RSHIFT((SIGNED_VALUE)(x),1))
18291#define RB_FIX2ULONG(x) ((unsigned long)RB_FIX2LONG(x))
18292#define RB_FIXNUM_P(f) (((int)(SIGNED_VALUE)(f))&RUBY_FIXNUM_FLAG)
18293#define RB_POSFIXABLE(f) ((f) < RUBY_FIXNUM_MAX+1)
18294#define RB_NEGFIXABLE(f) ((f) >= RUBY_FIXNUM_MIN)
18295#define RB_FIXABLE(f) (RB_POSFIXABLE(f) && RB_NEGFIXABLE(f))
18296#define FIX2LONG(x) RB_FIX2LONG(x)
18297#define FIX2ULONG(x) RB_FIX2ULONG(x)
18298#define FIXNUM_P(f) RB_FIXNUM_P(f)
18299#define POSFIXABLE(f) RB_POSFIXABLE(f)
18300#define NEGFIXABLE(f) RB_NEGFIXABLE(f)
18301#define FIXABLE(f) RB_FIXABLE(f)
18302#define RB_IMMEDIATE_P(x) ((VALUE)(x) & RUBY_IMMEDIATE_MASK)
18303#define IMMEDIATE_P(x) RB_IMMEDIATE_P(x)
18304#define RB_STATIC_SYM_P(x) (((VALUE)(x)&~((~(VALUE)0)<<RUBY_SPECIAL_SHIFT)) == RUBY_SYMBOL_FLAG)
18305#define RB_DYNAMIC_SYM_P(x) (!RB_SPECIAL_CONST_P(x) && RB_BUILTIN_TYPE(x) == (RUBY_T_SYMBOL))
18306#define RB_SYMBOL_P(x) (RB_STATIC_SYM_P(x)||RB_DYNAMIC_SYM_P(x))
18307#define RB_ID2SYM(x) (rb_id2sym(x))
18308#define RB_SYM2ID(x) (rb_sym2id(x))
18309#define STATIC_SYM_P(x) RB_STATIC_SYM_P(x)
18310#define DYNAMIC_SYM_P(x) RB_DYNAMIC_SYM_P(x)
18311#define SYMBOL_P(x) RB_SYMBOL_P(x)
18312#define ID2SYM(x) RB_ID2SYM(x)
18313#define SYM2ID(x) RB_SYM2ID(x)
18314#define USE_FLONUM 1
18315#define RB_FLONUM_P(x) ((((int)(SIGNED_VALUE)(x))&RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG)
18316#define FLONUM_P(x) RB_FLONUM_P(x)
18317#define USE_SYMBOL_AS_METHOD_NAME 1
18318#define RUBY_Qfalse ((VALUE)RUBY_Qfalse)
18319#define RUBY_Qtrue ((VALUE)RUBY_Qtrue)
18320#define RUBY_Qnil ((VALUE)RUBY_Qnil)
18321#define RUBY_Qundef ((VALUE)RUBY_Qundef)
18322#define Qfalse RUBY_Qfalse
18323#define Qtrue RUBY_Qtrue
18324#define Qnil RUBY_Qnil
18325#define Qundef RUBY_Qundef
18326#define IMMEDIATE_MASK RUBY_IMMEDIATE_MASK
18327#define FIXNUM_FLAG RUBY_FIXNUM_FLAG
18328#define FLONUM_MASK RUBY_FLONUM_MASK
18329#define FLONUM_FLAG RUBY_FLONUM_FLAG
18330#define SYMBOL_FLAG RUBY_SYMBOL_FLAG
18331#define RB_TEST(v) !(((VALUE)(v) & (VALUE)~RUBY_Qnil) == 0)
18332#define RB_NIL_P(v) !((VALUE)(v) != RUBY_Qnil)
18333#define RTEST(v) RB_TEST(v)
18334#define NIL_P(v) RB_NIL_P(v)
18335#define CLASS_OF(v) rb_class_of((VALUE)(v))
18336#define T_NONE RUBY_T_NONE
18337#define T_NIL RUBY_T_NIL
18338#define T_OBJECT RUBY_T_OBJECT
18339#define T_CLASS RUBY_T_CLASS
18340#define T_ICLASS RUBY_T_ICLASS
18341#define T_MODULE RUBY_T_MODULE
18342#define T_FLOAT RUBY_T_FLOAT
18343#define T_STRING RUBY_T_STRING
18344#define T_REGEXP RUBY_T_REGEXP
18345#define T_ARRAY RUBY_T_ARRAY
18346#define T_HASH RUBY_T_HASH
18347#define T_STRUCT RUBY_T_STRUCT
18348#define T_BIGNUM RUBY_T_BIGNUM
18349#define T_FILE RUBY_T_FILE
18350#define T_FIXNUM RUBY_T_FIXNUM
18351#define T_TRUE RUBY_T_TRUE
18352#define T_FALSE RUBY_T_FALSE
18353#define T_DATA RUBY_T_DATA
18354#define T_MATCH RUBY_T_MATCH
18355#define T_SYMBOL RUBY_T_SYMBOL
18356#define T_RATIONAL RUBY_T_RATIONAL
18357#define T_COMPLEX RUBY_T_COMPLEX
18358#define T_IMEMO RUBY_T_IMEMO
18359#define T_UNDEF RUBY_T_UNDEF
18360#define T_NODE RUBY_T_NODE
18361#define T_ZOMBIE RUBY_T_ZOMBIE
18362#define T_MOVED RUBY_T_MOVED
18363#define T_MASK RUBY_T_MASK
18364#define RB_BUILTIN_TYPE(x) (int)(((struct RBasic*)(x))->flags & RUBY_T_MASK)
18365#define BUILTIN_TYPE(x) RB_BUILTIN_TYPE(x)
18366#define TYPE(x) rb_type((VALUE)(x))
18367#define RB_FLOAT_TYPE_P(obj) ( RB_FLONUM_P(obj) || (!RB_SPECIAL_CONST_P(obj) && RB_BUILTIN_TYPE(obj) == RUBY_T_FLOAT))
18368#define RB_TYPE_P(obj,type) ( ((type) == RUBY_T_FIXNUM) ? RB_FIXNUM_P(obj) : ((type) == RUBY_T_TRUE) ? ((obj) == RUBY_Qtrue) : ((type) == RUBY_T_FALSE) ? ((obj) == RUBY_Qfalse) : ((type) == RUBY_T_NIL) ? ((obj) == RUBY_Qnil) : ((type) == RUBY_T_UNDEF) ? ((obj) == RUBY_Qundef) : ((type) == RUBY_T_SYMBOL) ? RB_SYMBOL_P(obj) : ((type) == RUBY_T_FLOAT) ? RB_FLOAT_TYPE_P(obj) : (!RB_SPECIAL_CONST_P(obj) && RB_BUILTIN_TYPE(obj) == (type)))
18369#define RB_GC_GUARD(v) (*__extension__ ({ volatile VALUE *rb_gc_guarded_ptr = &(v); __asm__("" : : "m"(rb_gc_guarded_ptr)); rb_gc_guarded_ptr; }))
18370#define RB_UNUSED_VAR(x) x __attribute__ ((unused))
18371#define Check_Type(v,t) rb_check_type((VALUE)(v),(t))
18372#define StringValue(v) rb_string_value(&(v))
18373#define StringValuePtr(v) rb_string_value_ptr(&(v))
18374#define StringValueCStr(v) rb_string_value_cstr(&(v))
18375#define SafeStringValue(v) StringValue(v)
18376#define Check_SafeStr(v) rb_check_safe_str((VALUE)(v))
18377#define ExportStringValue(v) do { StringValue(v); (v) = rb_str_export(v);} while (0)
18378#define FilePathValue(v) (RB_GC_GUARD(v) = rb_get_path(v))
18379#define FilePathStringValue(v) ((v) = rb_get_path(v))
18380#define RUBY_SAFE_LEVEL_MAX 1
18381#define ruby_safe_level_2_warning() ruby_safe_level_2_error()
18382#define RUBY_SAFE_LEVEL_INVALID_P(level) __extension__( __builtin_choose_expr( __builtin_constant_p(level), ((level) < 0 || RUBY_SAFE_LEVEL_MAX < (level)), 0))
18383#define RUBY_SAFE_LEVEL_CHECK(level,type) __extension__(__builtin_choose_expr(RUBY_SAFE_LEVEL_INVALID_P(level), ruby_safe_level_2_ ##type(), (level)))
18384#define rb_secure(level) rb_secure(RUBY_SAFE_LEVEL_CHECK(level, warning))
18385#define rb_set_safe_level(level) rb_set_safe_level(RUBY_SAFE_LEVEL_CHECK(level, error))
18386#define RB_NUM2LONG(x) rb_num2long_inline(x)
18387#define NUM2LONG(x) RB_NUM2LONG(x)
18388#define RB_NUM2ULONG(x) rb_num2ulong_inline(x)
18389#define NUM2ULONG(x) RB_NUM2ULONG(x)
18390#define RB_FIX2INT(x) ((int)rb_fix2int((VALUE)(x)))
18391#define RB_NUM2INT(x) rb_num2int_inline(x)
18392#define RB_NUM2UINT(x) ((unsigned int)rb_num2uint(x))
18393#define RB_FIX2UINT(x) ((unsigned int)rb_fix2uint(x))
18394#define NUM2INT(x) RB_NUM2INT(x)
18395#define NUM2UINT(x) RB_NUM2UINT(x)
18396#define FIX2INT(x) RB_FIX2INT(x)
18397#define FIX2UINT(x) RB_FIX2UINT(x)
18398#define RB_FIX2SHORT(x) (rb_fix2short((VALUE)(x)))
18399#define FIX2SHORT(x) RB_FIX2SHORT(x)
18400#define RB_NUM2SHORT(x) rb_num2short_inline(x)
18401#define RB_NUM2USHORT(x) rb_num2ushort(x)
18402#define NUM2SHORT(x) RB_NUM2SHORT(x)
18403#define NUM2USHORT(x) RB_NUM2USHORT(x)
18404#define RB_NUM2LL(x) rb_num2ll_inline(x)
18405#define RB_NUM2ULL(x) rb_num2ull(x)
18406#define NUM2LL(x) RB_NUM2LL(x)
18407#define NUM2ULL(x) RB_NUM2ULL(x)
18408#define NUM2SIZET(x) NUM2ULONG(x)
18409#define NUM2SSIZET(x) NUM2LONG(x)
18410#define NUM2DBL(x) rb_num2dbl((VALUE)(x))
18411#define RB_NEWOBJ(obj,type) type *(obj) = (type*)rb_newobj()
18412#define RB_NEWOBJ_OF(obj,type,klass,flags) type *(obj) = (type*)rb_newobj_of(klass, flags)
18413#define NEWOBJ(obj,type) RB_NEWOBJ(obj,type)
18414#define NEWOBJ_OF(obj,type,klass,flags) RB_NEWOBJ_OF(obj,type,klass,flags)
18415#define OBJSETUP(obj,c,t) rb_obj_setup(obj, c, t)
18416#define CLONESETUP(clone,obj) rb_clone_setup(clone,obj)
18417#define DUPSETUP(dup,obj) rb_dup_setup(dup,obj)
18418#define USE_RGENGC 1
18419#define USE_RINCGC 1
18420#define RGENGC_WB_PROTECTED_ARRAY 1
18421#define RGENGC_WB_PROTECTED_HASH 1
18422#define RGENGC_WB_PROTECTED_STRUCT 1
18423#define RGENGC_WB_PROTECTED_STRING 1
18424#define RGENGC_WB_PROTECTED_OBJECT 1
18425#define RGENGC_WB_PROTECTED_REGEXP 1
18426#define RGENGC_WB_PROTECTED_CLASS 1
18427#define RGENGC_WB_PROTECTED_FLOAT 1
18428#define RGENGC_WB_PROTECTED_COMPLEX 1
18429#define RGENGC_WB_PROTECTED_RATIONAL 1
18430#define RGENGC_WB_PROTECTED_BIGNUM 1
18431#define RGENGC_WB_PROTECTED_NODE_CREF 1
18432#define RUBY_FL_USER_N(n) RUBY_FL_USER ##n = (1<<(RUBY_FL_USHIFT+n))
18433#define RB_OBJ_WB_UNPROTECT_FOR(type,obj) __extension__( __builtin_choose_expr( RGENGC_WB_PROTECTED_ ##type, OBJ_WB_UNPROTECT((VALUE)(obj)), ((VALUE)(obj))))
18434#define RBASIC_CLASS(obj) (RBASIC(obj)->klass)
18435#define RVALUE_EMBED_LEN_MAX RVALUE_EMBED_LEN_MAX
18436#define ROBJECT_EMBED_LEN_MAX ROBJECT_EMBED_LEN_MAX
18437#define ROBJECT_EMBED ROBJECT_EMBED
18438#define ROBJECT_NUMIV(o) ((RBASIC(o)->flags & ROBJECT_EMBED) ? ROBJECT_EMBED_LEN_MAX : ROBJECT(o)->as.heap.numiv)
18439#define ROBJECT_IVPTR(o) ((RBASIC(o)->flags & ROBJECT_EMBED) ? ROBJECT(o)->as.ary : ROBJECT(o)->as.heap.ivptr)
18440#define ROBJECT_IV_INDEX_TBL(o) ((RBASIC(o)->flags & ROBJECT_EMBED) ? RCLASS_IV_INDEX_TBL(rb_obj_class(o)) : ROBJECT(o)->as.heap.iv_index_tbl)
18441#define RCLASS_SUPER(c) rb_class_get_superclass(c)
18442#define RMODULE_IV_TBL(m) RCLASS_IV_TBL(m)
18443#define RMODULE_CONST_TBL(m) RCLASS_CONST_TBL(m)
18444#define RMODULE_M_TBL(m) RCLASS_M_TBL(m)
18445#define RMODULE_SUPER(m) RCLASS_SUPER(m)
18446#define RMODULE_IS_OVERLAID RMODULE_IS_OVERLAID
18447#define RMODULE_IS_REFINEMENT RMODULE_IS_REFINEMENT
18448#define RMODULE_INCLUDED_INTO_REFINEMENT RMODULE_INCLUDED_INTO_REFINEMENT
18449#define RFLOAT_VALUE(v) rb_float_value(v)
18450#define DBL2NUM(dbl) rb_float_new(dbl)
18451#define RUBY_ELTS_SHARED RUBY_ELTS_SHARED
18452#define ELTS_SHARED RUBY_ELTS_SHARED
18453#define RSTRING_NOEMBED RSTRING_NOEMBED
18454#define RSTRING_EMBED_LEN_MASK RSTRING_EMBED_LEN_MASK
18455#define RSTRING_EMBED_LEN_SHIFT RSTRING_EMBED_LEN_SHIFT
18456#define RSTRING_EMBED_LEN_MAX RSTRING_EMBED_LEN_MAX
18457#define RSTRING_FSTR RSTRING_FSTR
18458#define RSTRING_EMBED_LEN(str) (long)((RBASIC(str)->flags >> RSTRING_EMBED_LEN_SHIFT) & (RSTRING_EMBED_LEN_MASK >> RSTRING_EMBED_LEN_SHIFT))
18459#define RSTRING_LEN(str) (!(RBASIC(str)->flags & RSTRING_NOEMBED) ? RSTRING_EMBED_LEN(str) : RSTRING(str)->as.heap.len)
18460#define RSTRING_PTR(str) (!(RBASIC(str)->flags & RSTRING_NOEMBED) ? RSTRING(str)->as.ary : RSTRING(str)->as.heap.ptr)
18461#define RSTRING_END(str) (!(RBASIC(str)->flags & RSTRING_NOEMBED) ? (RSTRING(str)->as.ary + RSTRING_EMBED_LEN(str)) : (RSTRING(str)->as.heap.ptr + RSTRING(str)->as.heap.len))
18462#define RSTRING_LENINT(str) rb_long2int(RSTRING_LEN(str))
18463#define RSTRING_GETMEM(str,ptrvar,lenvar) (!(RBASIC(str)->flags & RSTRING_NOEMBED) ? ((ptrvar) = RSTRING(str)->as.ary, (lenvar) = RSTRING_EMBED_LEN(str)) : ((ptrvar) = RSTRING(str)->as.heap.ptr, (lenvar) = RSTRING(str)->as.heap.len))
18464#define USE_TRANSIENT_HEAP 1
18465#define RARRAY_TRANSIENT_FLAG RARRAY_TRANSIENT_FLAG
18466#define RARRAY_EMBED_FLAG (VALUE)RARRAY_EMBED_FLAG
18467#define RARRAY_EMBED_LEN_MASK (VALUE)RARRAY_EMBED_LEN_MASK
18468#define RARRAY_EMBED_LEN_MAX RARRAY_EMBED_LEN_MAX
18469#define RARRAY_EMBED_LEN_SHIFT RARRAY_EMBED_LEN_SHIFT
18470#define RARRAY_EMBED_LEN(a) (long)((RBASIC(a)->flags >> RARRAY_EMBED_LEN_SHIFT) & (RARRAY_EMBED_LEN_MASK >> RARRAY_EMBED_LEN_SHIFT))
18471#define RARRAY_LEN(a) rb_array_len(a)
18472#define RARRAY_LENINT(ary) rb_long2int(RARRAY_LEN(ary))
18473#define RARRAY_CONST_PTR(a) rb_array_const_ptr(a)
18474#define RARRAY_CONST_PTR_TRANSIENT(a) rb_array_const_ptr_transient(a)
18475#define RARRAY_TRANSIENT_P(ary) FL_TEST_RAW((ary), RARRAY_TRANSIENT_FLAG)
18476#define RARRAY_PTR_USE_START_TRANSIENT(a) rb_array_ptr_use_start(a, 1)
18477#define RARRAY_PTR_USE_END_TRANSIENT(a) rb_array_ptr_use_end(a, 1)
18478#define RARRAY_PTR_USE_TRANSIENT(ary,ptr_name,expr) do { const VALUE _ary = (ary); VALUE *ptr_name = (VALUE *)RARRAY_PTR_USE_START_TRANSIENT(_ary); expr; RARRAY_PTR_USE_END_TRANSIENT(_ary); } while (0)
18479#define RARRAY_PTR_USE_START(a) rb_array_ptr_use_start(a, 0)
18480#define RARRAY_PTR_USE_END(a) rb_array_ptr_use_end(a, 0)
18481#define RARRAY_PTR_USE(ary,ptr_name,expr) do { const VALUE _ary = (ary); VALUE *ptr_name = (VALUE *)RARRAY_PTR_USE_START(_ary); expr; RARRAY_PTR_USE_END(_ary); } while (0)
18482#define RARRAY_AREF(a,i) (RARRAY_CONST_PTR_TRANSIENT(a)[i])
18483#define RARRAY_ASET(a,i,v) do { const VALUE _ary = (a); const VALUE _v = (v); VALUE *ptr = (VALUE *)RARRAY_PTR_USE_START_TRANSIENT(_ary); RB_OBJ_WRITE(_ary, &ptr[i], _v); RARRAY_PTR_USE_END_TRANSIENT(_ary); } while (0)
18484#define RARRAY_PTR(a) ((VALUE *)RARRAY_CONST_PTR(RB_OBJ_WB_UNPROTECT_FOR(ARRAY, a)))
18485#define RREGEXP_PTR(r) (RREGEXP(r)->ptr)
18486#define RREGEXP_SRC(r) (RREGEXP(r)->src)
18487#define RREGEXP_SRC_PTR(r) RSTRING_PTR(RREGEXP(r)->src)
18488#define RREGEXP_SRC_LEN(r) RSTRING_LEN(RREGEXP(r)->src)
18489#define RREGEXP_SRC_END(r) RSTRING_END(RREGEXP(r)->src)
18490#define RHASH_TBL(h) rb_hash_tbl(h, __FILE__, __LINE__)
18491#define RHASH_ITER_LEV(h) rb_hash_iter_lev(h)
18492#define RHASH_IFNONE(h) rb_hash_ifnone(h)
18493#define RHASH_SIZE(h) rb_hash_size_num(h)
18494#define RHASH_EMPTY_P(h) (RHASH_SIZE(h) == 0)
18495#define RHASH_SET_IFNONE(h,ifnone) rb_hash_set_ifnone((VALUE)h, ifnone)
18496#define HAVE_TYPE_RB_DATA_TYPE_T 1
18497#define HAVE_RB_DATA_TYPE_T_FUNCTION 1
18498#define HAVE_RB_DATA_TYPE_T_PARENT 1
18499#define DATA_PTR(dta) (RDATA(dta)->data)
18500#define RTYPEDDATA_P(v) (RTYPEDDATA(v)->typed_flag == 1)
18501#define RTYPEDDATA_TYPE(v) (RTYPEDDATA(v)->type)
18502#define RTYPEDDATA_DATA(v) (RTYPEDDATA(v)->data)
18503#define RUBY_UNTYPED_DATA_WARNING 1
18504#define Check_TypedStruct(v,t) rb_check_typeddata((VALUE)(v),(t))
18505#define RUBY_DEFAULT_FREE ((RUBY_DATA_FUNC)-1)
18506#define RUBY_NEVER_FREE ((RUBY_DATA_FUNC)0)
18507#define RUBY_TYPED_DEFAULT_FREE RUBY_DEFAULT_FREE
18508#define RUBY_TYPED_NEVER_FREE RUBY_NEVER_FREE
18509#define RUBY_TYPED_FREE_IMMEDIATELY 1
18510#define RUBY_TYPED_WB_PROTECTED RUBY_FL_WB_PROTECTED
18511#define RUBY_TYPED_PROMOTED1 RUBY_FL_PROMOTED1
18512#define Data_Wrap_Struct(klass,mark,free,sval) rb_data_object_wrap((klass),(sval),(RUBY_DATA_FUNC)(mark),(RUBY_DATA_FUNC)(free))
18513#define Data_Make_Struct0(result,klass,type,size,mark,free,sval) VALUE result = rb_data_object_zalloc((klass), (size), (RUBY_DATA_FUNC)(mark), (RUBY_DATA_FUNC)(free)); (void)((sval) = (type *)DATA_PTR(result));
18514#define Data_Make_Struct(klass,type,mark,free,sval) RB_GNUC_EXTENSION_BLOCK( Data_Make_Struct0(data_struct_obj, klass, type, sizeof(type), mark, free, sval); data_struct_obj )
18515#define TypedData_Wrap_Struct(klass,data_type,sval) rb_data_typed_object_wrap((klass),(sval),(data_type))
18516#define TypedData_Make_Struct0(result,klass,type,size,data_type,sval) VALUE result = rb_data_typed_object_zalloc(klass, size, data_type); (void)((sval) = (type *)DATA_PTR(result));
18517#define TypedData_Make_Struct(klass,type,data_type,sval) RB_GNUC_EXTENSION_BLOCK( TypedData_Make_Struct0(data_struct_obj, klass, type, sizeof(type), data_type, sval); data_struct_obj )
18518#define Data_Get_Struct(obj,type,sval) ((sval) = (type*)rb_data_object_get(obj))
18519#define TypedData_Get_Struct(obj,type,data_type,sval) ((sval) = (type*)rb_check_typeddata((obj), (data_type)))
18520#define RSTRUCT_LEN(st) NUM2LONG(rb_struct_size(st))
18521#define RSTRUCT_PTR(st) rb_struct_ptr(st)
18522#define RSTRUCT_SET(st,idx,v) rb_struct_aset(st, INT2NUM(idx), (v))
18523#define RSTRUCT_GET(st,idx) rb_struct_aref(st, INT2NUM(idx))
18524#define RBIGNUM_SIGN(b) (rb_big_sign(b))
18525#define RBIGNUM_POSITIVE_P(b) (RBIGNUM_SIGN(b)!=0)
18526#define RBIGNUM_NEGATIVE_P(b) (RBIGNUM_SIGN(b)==0)
18527#define R_CAST(st) (struct st*)
18528#define RMOVED(obj) (R_CAST(RMoved)(obj))
18529#define RBASIC(obj) (R_CAST(RBasic)(obj))
18530#define ROBJECT(obj) (R_CAST(RObject)(obj))
18531#define RCLASS(obj) (R_CAST(RClass)(obj))
18532#define RMODULE(obj) RCLASS(obj)
18533#define RSTRING(obj) (R_CAST(RString)(obj))
18534#define RREGEXP(obj) (R_CAST(RRegexp)(obj))
18535#define RARRAY(obj) (R_CAST(RArray)(obj))
18536#define RDATA(obj) (R_CAST(RData)(obj))
18537#define RTYPEDDATA(obj) (R_CAST(RTypedData)(obj))
18538#define RFILE(obj) (R_CAST(RFile)(obj))
18539#define FL_SINGLETON ((VALUE)RUBY_FL_SINGLETON)
18540#define FL_WB_PROTECTED ((VALUE)RUBY_FL_WB_PROTECTED)
18541#define FL_PROMOTED0 ((VALUE)RUBY_FL_PROMOTED0)
18542#define FL_PROMOTED1 ((VALUE)RUBY_FL_PROMOTED1)
18543#define FL_FINALIZE ((VALUE)RUBY_FL_FINALIZE)
18544#define FL_TAINT ((VALUE)RUBY_FL_TAINT)
18545#define FL_UNTRUSTED ((VALUE)RUBY_FL_UNTRUSTED)
18546#define FL_SEEN_OBJ_ID ((VALUE)RUBY_FL_SEEN_OBJ_ID)
18547#define FL_EXIVAR ((VALUE)RUBY_FL_EXIVAR)
18548#define FL_FREEZE ((VALUE)RUBY_FL_FREEZE)
18549#define FL_USHIFT ((VALUE)RUBY_FL_USHIFT)
18550#define FL_USER0 ((VALUE)RUBY_FL_USER0)
18551#define FL_USER1 ((VALUE)RUBY_FL_USER1)
18552#define FL_USER2 ((VALUE)RUBY_FL_USER2)
18553#define FL_USER3 ((VALUE)RUBY_FL_USER3)
18554#define FL_USER4 ((VALUE)RUBY_FL_USER4)
18555#define FL_USER5 ((VALUE)RUBY_FL_USER5)
18556#define FL_USER6 ((VALUE)RUBY_FL_USER6)
18557#define FL_USER7 ((VALUE)RUBY_FL_USER7)
18558#define FL_USER8 ((VALUE)RUBY_FL_USER8)
18559#define FL_USER9 ((VALUE)RUBY_FL_USER9)
18560#define FL_USER10 ((VALUE)RUBY_FL_USER10)
18561#define FL_USER11 ((VALUE)RUBY_FL_USER11)
18562#define FL_USER12 ((VALUE)RUBY_FL_USER12)
18563#define FL_USER13 ((VALUE)RUBY_FL_USER13)
18564#define FL_USER14 ((VALUE)RUBY_FL_USER14)
18565#define FL_USER15 ((VALUE)RUBY_FL_USER15)
18566#define FL_USER16 ((VALUE)RUBY_FL_USER16)
18567#define FL_USER17 ((VALUE)RUBY_FL_USER17)
18568#define FL_USER18 ((VALUE)RUBY_FL_USER18)
18569#define FL_USER19 ((VALUE)(unsigned int)RUBY_FL_USER19)
18570#define RB_SPECIAL_CONST_P(x) (RB_IMMEDIATE_P(x) || !RB_TEST(x))
18571#define SPECIAL_CONST_P(x) RB_SPECIAL_CONST_P(x)
18572#define RB_FL_ABLE(x) (!RB_SPECIAL_CONST_P(x) && RB_BUILTIN_TYPE(x) != RUBY_T_NODE)
18573#define RB_FL_TEST_RAW(x,f) (RBASIC(x)->flags&(f))
18574#define RB_FL_TEST(x,f) (RB_FL_ABLE(x)?RB_FL_TEST_RAW((x),(f)):0)
18575#define RB_FL_ANY_RAW(x,f) RB_FL_TEST_RAW((x),(f))
18576#define RB_FL_ANY(x,f) RB_FL_TEST((x),(f))
18577#define RB_FL_ALL_RAW(x,f) (RB_FL_TEST_RAW((x),(f)) == (f))
18578#define RB_FL_ALL(x,f) (RB_FL_TEST((x),(f)) == (f))
18579#define RB_FL_SET_RAW(x,f) (void)(RBASIC(x)->flags |= (f))
18580#define RB_FL_SET(x,f) (RB_FL_ABLE(x) ? RB_FL_SET_RAW(x, f) : (void)0)
18581#define RB_FL_UNSET_RAW(x,f) (void)(RBASIC(x)->flags &= ~(VALUE)(f))
18582#define RB_FL_UNSET(x,f) (RB_FL_ABLE(x) ? RB_FL_UNSET_RAW(x, f) : (void)0)
18583#define RB_FL_REVERSE_RAW(x,f) (void)(RBASIC(x)->flags ^= (f))
18584#define RB_FL_REVERSE(x,f) (RB_FL_ABLE(x) ? RB_FL_REVERSE_RAW(x, f) : (void)0)
18585#define RB_OBJ_TAINTABLE(x) (RB_FL_ABLE(x) && RB_BUILTIN_TYPE(x) != RUBY_T_BIGNUM && RB_BUILTIN_TYPE(x) != RUBY_T_FLOAT)
18586#define RB_OBJ_TAINTED_RAW(x) RB_FL_TEST_RAW(x, RUBY_FL_TAINT)
18587#define RB_OBJ_TAINTED(x) (!!RB_FL_TEST((x), RUBY_FL_TAINT))
18588#define RB_OBJ_TAINT_RAW(x) RB_FL_SET_RAW(x, RUBY_FL_TAINT)
18589#define RB_OBJ_TAINT(x) (RB_OBJ_TAINTABLE(x) ? RB_OBJ_TAINT_RAW(x) : (void)0)
18590#define RB_OBJ_UNTRUSTED(x) RB_OBJ_TAINTED(x)
18591#define RB_OBJ_UNTRUST(x) RB_OBJ_TAINT(x)
18592#define RB_OBJ_INFECT_RAW(x,s) RB_FL_SET_RAW(x, RB_OBJ_TAINTED_RAW(s))
18593#define RB_OBJ_INFECT(x,s) ( (RB_OBJ_TAINTABLE(x) && RB_FL_ABLE(s)) ? RB_OBJ_INFECT_RAW(x, s) : (void)0)
18594#define RB_OBJ_FROZEN_RAW(x) (RBASIC(x)->flags&RUBY_FL_FREEZE)
18595#define RB_OBJ_FROZEN(x) (!RB_FL_ABLE(x) || RB_OBJ_FROZEN_RAW(x))
18596#define RB_OBJ_FREEZE_RAW(x) (void)(RBASIC(x)->flags |= RUBY_FL_FREEZE)
18597#define RB_OBJ_FREEZE(x) rb_obj_freeze_inline((VALUE)x)
18598#define FL_ABLE(x) RB_FL_ABLE(x)
18599#define FL_TEST_RAW(x,f) RB_FL_TEST_RAW(x,f)
18600#define FL_TEST(x,f) RB_FL_TEST(x,f)
18601#define FL_ANY_RAW(x,f) RB_FL_ANY_RAW(x,f)
18602#define FL_ANY(x,f) RB_FL_ANY(x,f)
18603#define FL_ALL_RAW(x,f) RB_FL_ALL_RAW(x,f)
18604#define FL_ALL(x,f) RB_FL_ALL(x,f)
18605#define FL_SET_RAW(x,f) RB_FL_SET_RAW(x,f)
18606#define FL_SET(x,f) RB_FL_SET(x,f)
18607#define FL_UNSET_RAW(x,f) RB_FL_UNSET_RAW(x,f)
18608#define FL_UNSET(x,f) RB_FL_UNSET(x,f)
18609#define FL_REVERSE_RAW(x,f) RB_FL_REVERSE_RAW(x,f)
18610#define FL_REVERSE(x,f) RB_FL_REVERSE(x,f)
18611#define OBJ_TAINTABLE(x) RB_OBJ_TAINTABLE(x)
18612#define OBJ_TAINTED_RAW(x) RB_OBJ_TAINTED_RAW(x)
18613#define OBJ_TAINTED(x) RB_OBJ_TAINTED(x)
18614#define OBJ_TAINT_RAW(x) RB_OBJ_TAINT_RAW(x)
18615#define OBJ_TAINT(x) RB_OBJ_TAINT(x)
18616#define OBJ_UNTRUSTED(x) RB_OBJ_UNTRUSTED(x)
18617#define OBJ_UNTRUST(x) RB_OBJ_UNTRUST(x)
18618#define OBJ_INFECT_RAW(x,s) RB_OBJ_INFECT_RAW(x,s)
18619#define OBJ_INFECT(x,s) RB_OBJ_INFECT(x,s)
18620#define OBJ_FROZEN_RAW(x) RB_OBJ_FROZEN_RAW(x)
18621#define OBJ_FROZEN(x) RB_OBJ_FROZEN(x)
18622#define OBJ_FREEZE_RAW(x) RB_OBJ_FREEZE_RAW(x)
18623#define OBJ_FREEZE(x) RB_OBJ_FREEZE(x)
18624#define RUBY_UNTYPED_DATA_FUNC(func) func __attribute__((warning("untyped Data is unsafe; use TypedData instead")))
18625#define rb_data_object_wrap_warning(klass,ptr,mark,free) __extension__( __builtin_choose_expr( __builtin_constant_p(klass) && !(klass), rb_data_object_wrap(klass, ptr, mark, free), rb_data_object_wrap_warning(klass, ptr, mark, free)))
18626#define rb_data_object_wrap_0 rb_data_object_wrap
18627#define rb_data_object_wrap_1 rb_data_object_wrap_warning
18628#define rb_data_object_wrap RUBY_MACRO_SELECT(rb_data_object_wrap_, RUBY_UNTYPED_DATA_WARNING)
18629#define rb_data_object_get_0 rb_data_object_get
18630#define rb_data_object_get_1 rb_data_object_get_warning
18631#define rb_data_object_get RUBY_MACRO_SELECT(rb_data_object_get_, RUBY_UNTYPED_DATA_WARNING)
18632#define rb_data_object_make_0 rb_data_object_make
18633#define rb_data_object_make_1 rb_data_object_make_warning
18634#define rb_data_object_make RUBY_MACRO_SELECT(rb_data_object_make_, RUBY_UNTYPED_DATA_WARNING)
18635#define RB_OBJ_PROMOTED_RAW(x) RB_FL_ALL_RAW(x, RUBY_FL_PROMOTED)
18636#define RB_OBJ_PROMOTED(x) (RB_SPECIAL_CONST_P(x) ? 0 : RB_OBJ_PROMOTED_RAW(x))
18637#define RB_OBJ_WB_UNPROTECT(x) rb_obj_wb_unprotect(x, __FILE__, __LINE__)
18638#define OBJ_PROMOTED_RAW(x) RB_OBJ_PROMOTED_RAW(x)
18639#define OBJ_PROMOTED(x) RB_OBJ_PROMOTED(x)
18640#define OBJ_WB_UNPROTECT(x) RB_OBJ_WB_UNPROTECT(x)
18641#define RB_OBJ_WRITE(a,slot,b) rb_obj_write((VALUE)(a), (VALUE *)(slot), (VALUE)(b), __FILE__, __LINE__)
18642#define RB_OBJ_WRITTEN(a,oldv,b) rb_obj_written((VALUE)(a), (VALUE)(oldv), (VALUE)(b), __FILE__, __LINE__)
18643#define USE_RGENGC_LOGGING_WB_UNPROTECT 0
18644#define RUBY_INTEGER_UNIFICATION 1
18645#define RB_INTEGER_TYPE_P(obj) rb_integer_type_p(obj)
18646#define RB_INT2NUM(v) RB_INT2FIX((int)(v))
18647#define RB_UINT2NUM(v) RB_LONG2FIX((unsigned int)(v))
18648#define INT2NUM(x) RB_INT2NUM(x)
18649#define UINT2NUM(x) RB_UINT2NUM(x)
18650#define RB_LONG2NUM(x) rb_long2num_inline(x)
18651#define RB_ULONG2NUM(x) rb_ulong2num_inline(x)
18652#define RB_NUM2CHR(x) rb_num2char_inline(x)
18653#define RB_CHR2FIX(x) RB_INT2FIX((long)((x)&0xff))
18654#define LONG2NUM(x) RB_LONG2NUM(x)
18655#define ULONG2NUM(x) RB_ULONG2NUM(x)
18656#define USHORT2NUM(x) RB_INT2FIX(x)
18657#define NUM2CHR(x) RB_NUM2CHR(x)
18658#define CHR2FIX(x) RB_CHR2FIX(x)
18659#define RB_ST2FIX(h) RB_LONG2FIX((long)(h))
18660#define ST2FIX(h) RB_ST2FIX(h)
18661#define RB_ALLOC_N(type,n) ((type*)ruby_xmalloc2((size_t)(n),sizeof(type)))
18662#define RB_ALLOC(type) ((type*)ruby_xmalloc(sizeof(type)))
18663#define RB_ZALLOC_N(type,n) ((type*)ruby_xcalloc((size_t)(n),sizeof(type)))
18664#define RB_ZALLOC(type) (RB_ZALLOC_N(type,1))
18665#define RB_REALLOC_N(var,type,n) ((var)=(type*)ruby_xrealloc2((char*)(var),(size_t)(n),sizeof(type)))
18666#define ALLOC_N(type,n) RB_ALLOC_N(type,n)
18667#define ALLOC(type) RB_ALLOC(type)
18668#define ZALLOC_N(type,n) RB_ZALLOC_N(type,n)
18669#define ZALLOC(type) RB_ZALLOC(type)
18670#define REALLOC_N(var,type,n) RB_REALLOC_N(var,type,n)
18671#define ALLOCA_N(type,n) (type*)__builtin_alloca_with_align((sizeof(type)*(n)), RUBY_ALIGNOF(type) * CHAR_BIT)
18672#define DSIZE_T uint128_t
18673#define RUBY_ALLOCV_LIMIT 1024
18674#define RB_ALLOCV(v,n) ((n) < RUBY_ALLOCV_LIMIT ? ((v) = 0, alloca(n)) : rb_alloc_tmp_buffer(&(v), (n)))
18675#define RB_ALLOCV_N(type,v,n) ((type*)(((size_t)(n) < RUBY_ALLOCV_LIMIT / sizeof(type)) ? ((v) = 0, alloca((size_t)(n) * sizeof(type))) : rb_alloc_tmp_buffer2(&(v), (long)(n), sizeof(type))))
18676#define RB_ALLOCV_END(v) rb_free_tmp_buffer(&(v))
18677#define ALLOCV(v,n) RB_ALLOCV(v, n)
18678#define ALLOCV_N(type,v,n) RB_ALLOCV_N(type, v, n)
18679#define ALLOCV_END(v) RB_ALLOCV_END(v)
18680#define MEMZERO(p,type,n) memset((p), 0, sizeof(type)*(size_t)(n))
18681#define MEMCPY(p1,p2,type,n) memcpy((p1), (p2), sizeof(type)*(size_t)(n))
18682#define MEMMOVE(p1,p2,type,n) memmove((p1), (p2), sizeof(type)*(size_t)(n))
18683#define MEMCMP(p1,p2,type,n) memcmp((p1), (p2), sizeof(type)*(size_t)(n))
18684#define memcpy(p1,p2,n) ruby_nonempty_memcpy(p1, p2, n)
18685#define RUBY_CONST_ID_CACHE(result,str) { static ID rb_intern_id_cache; if (!rb_intern_id_cache) rb_intern_id_cache = rb_intern2((str), (long)strlen(str)); result rb_intern_id_cache; }
18686#define RUBY_CONST_ID(var,str) do RUBY_CONST_ID_CACHE((var) =, (str)) while (0)
18687#define CONST_ID_CACHE(result,str) RUBY_CONST_ID_CACHE(result, str)
18688#define CONST_ID(var,str) RUBY_CONST_ID(var, str)
18689#define rb_intern(str) (__builtin_constant_p(str) ? __extension__ (RUBY_CONST_ID_CACHE((ID), (str))) : rb_intern(str))
18690#define rb_intern_const(str) (__builtin_constant_p(str) ? __extension__ (rb_intern2((str), (long)strlen(str))) : (rb_intern)(str))
18691#define rb_varargs_argc_check_runtime(argc,vargc) (((argc) <= (vargc)) ? (argc) : (rb_fatal("argc(%d) exceeds actual arguments(%d)", argc, vargc), 0))
18692#define rb_varargs_argc_valid_p(argc,vargc) ((argc) == 0 ? (vargc) <= 1 : (argc) == (vargc))
18693#define rb_varargs_argc_check(argc,vargc) __builtin_choose_expr(__builtin_constant_p(argc), (rb_varargs_argc_valid_p(argc, vargc) ? (argc) : rb_varargs_bad_length(argc, vargc)), rb_varargs_argc_check_runtime(argc, vargc))
18694#define rb_funcall2 rb_funcallv
18695#define rb_funcall3 rb_funcallv_public
18696#define RB_SCAN_ARGS_PASS_CALLED_KEYWORDS 0
18697#define RB_SCAN_ARGS_KEYWORDS 1
18698#define RB_SCAN_ARGS_EMPTY_KEYWORDS 2
18699#define RB_SCAN_ARGS_LAST_HASH_KEYWORDS 3
18700#define HAVE_RB_SCAN_ARGS_OPTIONAL_HASH 1
18701#define ruby_verbose (*rb_ruby_verbose_ptr())
18702#define ruby_debug (*rb_ruby_debug_ptr())
18703#define RB_IO_WAIT_READABLE RB_IO_WAIT_READABLE
18704#define RB_IO_WAIT_WRITABLE RB_IO_WAIT_WRITABLE
18705#define RB_BLOCK_CALL_FUNC_STRICT 1
18706#define RUBY_BLOCK_CALL_FUNC_TAKES_BLOCKARG 1
18707#define RB_BLOCK_CALL_FUNC_ARGLIST(yielded_arg,callback_arg) VALUE yielded_arg, VALUE callback_arg, int argc, const VALUE *argv, VALUE blockarg
18708#define RB_NO_KEYWORDS 0
18709#define RB_PASS_KEYWORDS 1
18710#define RB_PASS_EMPTY_KEYWORDS 2
18711#define RB_PASS_CALLED_KEYWORDS 3
18712#define rb_type_p(obj,type) __extension__ (__builtin_constant_p(type) ? RB_TYPE_P((obj), (type)) : rb_type(obj) == (type))
18713#define rb_special_const_p(obj) __extension__ ({ VALUE special_const_obj = (obj); (int)(RB_SPECIAL_CONST_P(special_const_obj) ? RUBY_Qtrue : RUBY_Qfalse); })
18714#define RUBY_INTERN_H 1
18715#define RUBY_ST_H 1
18716#pragma GCC visibility push(default)
18717#define ST_DATA_T_DEFINED
18718#define MAX_ST_INDEX_VAL (~(st_index_t) 0)
18719#define SIZEOF_ST_INDEX_T SIZEOF_VOIDP
18720#define ST_INDEX_BITS (SIZEOF_ST_INDEX_T * CHAR_BIT)
18721#define ST_DATA_COMPATIBLE_P(type) __builtin_choose_expr(__builtin_types_compatible_p(type, st_data_t), 1, 0)
18722#define st_is_member(table,key) st_lookup((table),(key),(st_data_t *)0)
18723#define st_init_table rb_st_init_table
18724#define st_init_table_with_size rb_st_init_table_with_size
18725#define st_init_numtable rb_st_init_numtable
18726#define st_init_numtable_with_size rb_st_init_numtable_with_size
18727#define st_init_strtable rb_st_init_strtable
18728#define st_init_strtable_with_size rb_st_init_strtable_with_size
18729#define st_init_strcasetable rb_st_init_strcasetable
18730#define st_init_strcasetable_with_size rb_st_init_strcasetable_with_size
18731#define st_delete rb_st_delete
18732#define st_delete_safe rb_st_delete_safe
18733#define st_shift rb_st_shift
18734#define st_insert rb_st_insert
18735#define st_insert2 rb_st_insert2
18736#define st_lookup rb_st_lookup
18737#define st_get_key rb_st_get_key
18738#define st_update rb_st_update
18739#define st_foreach_with_replace rb_st_foreach_with_replace
18740#define st_foreach rb_st_foreach
18741#define st_foreach_check rb_st_foreach_check
18742#define st_keys rb_st_keys
18743#define st_keys_check rb_st_keys_check
18744#define st_values rb_st_values
18745#define st_values_check rb_st_values_check
18746#define st_add_direct rb_st_add_direct
18747#define st_free_table rb_st_free_table
18748#define st_cleanup_safe rb_st_cleanup_safe
18749#define st_clear rb_st_clear
18750#define st_copy rb_st_copy
18751#define st_numcmp rb_st_numcmp
18752#define st_numhash rb_st_numhash
18753#define st_locale_insensitive_strcasecmp rb_st_locale_insensitive_strcasecmp
18754#define st_locale_insensitive_strncasecmp rb_st_locale_insensitive_strncasecmp
18755#define st_strcasecmp rb_st_locale_insensitive_strcasecmp
18756#define st_strncasecmp rb_st_locale_insensitive_strncasecmp
18757#define st_memsize rb_st_memsize
18758#define st_hash rb_st_hash
18759#define st_hash_uint32 rb_st_hash_uint32
18760#define st_hash_uint rb_st_hash_uint
18761#define st_hash_end rb_st_hash_end
18762#define st_hash_start(h) ((st_index_t)(h))
18763#pragma GCC visibility pop
18764#define MJIT_STATIC static
18765#pragma GCC visibility push(default)
18766#define UNLIMITED_ARGUMENTS (-1)
18767#define rb_ary_new2 rb_ary_new_capa
18768#define rb_ary_new3 rb_ary_new_from_args
18769#define rb_ary_new4 rb_ary_new_from_values
18770#define rb_big2int(x) rb_big2long(x)
18771#define rb_big2uint(x) rb_big2ulong(x)
18772#define INTEGER_PACK_MSWORD_FIRST 0x01
18773#define INTEGER_PACK_LSWORD_FIRST 0x02
18774#define INTEGER_PACK_MSBYTE_FIRST 0x10
18775#define INTEGER_PACK_LSBYTE_FIRST 0x20
18776#define INTEGER_PACK_NATIVE_BYTE_ORDER 0x40
18777#define INTEGER_PACK_2COMP 0x80
18778#define INTEGER_PACK_FORCE_GENERIC_IMPLEMENTATION 0x400
18779#define INTEGER_PACK_FORCE_BIGNUM 0x100
18780#define INTEGER_PACK_NEGATIVE 0x200
18781#define INTEGER_PACK_LITTLE_ENDIAN (INTEGER_PACK_LSWORD_FIRST | INTEGER_PACK_LSBYTE_FIRST)
18782#define INTEGER_PACK_BIG_ENDIAN (INTEGER_PACK_MSWORD_FIRST | INTEGER_PACK_MSBYTE_FIRST)
18783#define rb_rational_raw1(x) rb_rational_raw((x), INT2FIX(1))
18784#define rb_rational_raw2(x,y) rb_rational_raw((x), (y))
18785#define rb_rational_new1(x) rb_rational_new((x), INT2FIX(1))
18786#define rb_rational_new2(x,y) rb_rational_new((x), (y))
18787#define rb_Rational1(x) rb_Rational((x), INT2FIX(1))
18788#define rb_Rational2(x,y) rb_Rational((x), (y))
18789#define rb_complex_raw1(x) rb_complex_raw((x), INT2FIX(0))
18790#define rb_complex_raw2(x,y) rb_complex_raw((x), (y))
18791#define rb_complex_new1(x) rb_complex_new((x), INT2FIX(0))
18792#define rb_complex_new2(x,y) rb_complex_new((x), (y))
18793#define rb_complex_add rb_complex_plus
18794#define rb_complex_sub rb_complex_minus
18795#define rb_complex_nagate rb_complex_uminus
18796#define rb_Complex1(x) rb_Complex((x), INT2FIX(0))
18797#define rb_Complex2(x,y) rb_Complex((x), (y))
18798#define SIZED_ENUMERATOR(obj,argc,argv,size_fn) rb_enumeratorize_with_size((obj), ID2SYM(rb_frame_this_func()), (argc), (argv), (size_fn))
18799#define SIZED_ENUMERATOR_KW(obj,argc,argv,size_fn,kw_splat) rb_enumeratorize_with_size_kw((obj), ID2SYM(rb_frame_this_func()), (argc), (argv), (size_fn), (kw_splat))
18800#define RETURN_SIZED_ENUMERATOR(obj,argc,argv,size_fn) do { if (!rb_block_given_p()) return SIZED_ENUMERATOR(obj, argc, argv, size_fn); } while (0)
18801#define RETURN_SIZED_ENUMERATOR_KW(obj,argc,argv,size_fn,kw_splat) do { if (!rb_block_given_p()) return SIZED_ENUMERATOR_KW(obj, argc, argv, size_fn, kw_splat); } while (0)
18802#define RETURN_ENUMERATOR(obj,argc,argv) RETURN_SIZED_ENUMERATOR(obj, argc, argv, 0)
18803#define RETURN_ENUMERATOR_KW(obj,argc,argv,kw_splat) RETURN_SIZED_ENUMERATOR_KW(obj, argc, argv, 0, kw_splat)
18804#define rb_exc_new2 rb_exc_new_cstr
18805#define rb_exc_new3 rb_exc_new_str
18806#define rb_check_frozen_internal(obj) do { VALUE frozen_obj = (obj); if (RB_UNLIKELY(RB_OBJ_FROZEN(frozen_obj))) { rb_error_frozen_object(frozen_obj); } } while (0)
18807#define rb_check_frozen(obj) __extension__({rb_check_frozen_internal(obj);})
18808#define RB_OBJ_INIT_COPY(obj,orig) ((obj) != (orig) && (rb_obj_init_copy((obj), (orig)), 1))
18809#define OBJ_INIT_COPY(obj,orig) RB_OBJ_INIT_COPY(obj, orig)
18810#define rb_check_arity rb_check_arity
18811#define rb_fd_ptr(f) ((f)->fdset)
18812#define rb_fd_max(f) ((f)->maxfd)
18813#define HAVE_RB_DEFINE_ALLOC_FUNC 1
18814#define st_foreach_safe rb_st_foreach_safe
18815#define rb_defout rb_stdout
18816#define RB_RESERVED_FD_P(fd) rb_reserved_fd_p(fd)
18817#define RB_NUM_COERCE_FUNCS_NEED_OPID 1
18818#define rb_memcmp memcmp
18819#define HAVE_RB_REG_NEW_STR 1
18820#define rb_argv rb_get_argv()
18821#define posix_signal ruby_posix_signal
18822#define rb_str_dup_frozen rb_str_new_frozen
18823#define rb_hash_uint32(h,i) st_hash_uint32((h), (i))
18824#define rb_hash_uint(h,i) st_hash_uint((h), (i))
18825#define rb_hash_end(h) st_hash_end(h)
18826#define rb_str_new(str,len) RB_GNUC_EXTENSION_BLOCK( (__builtin_constant_p(str) && __builtin_constant_p(len)) ? rb_str_new_static((str), (len)) : rb_str_new((str), (len)) )
18827#define rb_str_new_cstr(str) RB_GNUC_EXTENSION_BLOCK( (__builtin_constant_p(str)) ? rb_str_new_static((str), (long)strlen(str)) : rb_str_new_cstr(str) )
18828#define rb_usascii_str_new(str,len) RB_GNUC_EXTENSION_BLOCK( (__builtin_constant_p(str) && __builtin_constant_p(len)) ? rb_usascii_str_new_static((str), (len)) : rb_usascii_str_new((str), (len)) )
18829#define rb_utf8_str_new(str,len) RB_GNUC_EXTENSION_BLOCK( (__builtin_constant_p(str) && __builtin_constant_p(len)) ? rb_utf8_str_new_static((str), (len)) : rb_utf8_str_new((str), (len)) )
18830#define rb_tainted_str_new_cstr(str) RB_GNUC_EXTENSION_BLOCK( (__builtin_constant_p(str)) ? rb_tainted_str_new((str), (long)strlen(str)) : rb_tainted_str_new_cstr(str) )
18831#define rb_usascii_str_new_cstr(str) RB_GNUC_EXTENSION_BLOCK( (__builtin_constant_p(str)) ? rb_usascii_str_new_static((str), (long)strlen(str)) : rb_usascii_str_new_cstr(str) )
18832#define rb_utf8_str_new_cstr(str) RB_GNUC_EXTENSION_BLOCK( (__builtin_constant_p(str)) ? rb_utf8_str_new_static((str), (long)strlen(str)) : rb_utf8_str_new_cstr(str) )
18833#define rb_external_str_new_cstr(str) RB_GNUC_EXTENSION_BLOCK( (__builtin_constant_p(str)) ? rb_external_str_new((str), (long)strlen(str)) : rb_external_str_new_cstr(str) )
18834#define rb_locale_str_new_cstr(str) RB_GNUC_EXTENSION_BLOCK( (__builtin_constant_p(str)) ? rb_locale_str_new((str), (long)strlen(str)) : rb_locale_str_new_cstr(str) )
18835#define rb_str_buf_new_cstr(str) RB_GNUC_EXTENSION_BLOCK( (__builtin_constant_p(str)) ? rb_str_buf_cat(rb_str_buf_new((long)strlen(str)), (str), (long)strlen(str)) : rb_str_buf_new_cstr(str) )
18836#define rb_str_cat_cstr(str,ptr) RB_GNUC_EXTENSION_BLOCK( (__builtin_constant_p(ptr)) ? rb_str_cat((str), (ptr), (long)strlen(ptr)) : rb_str_cat_cstr((str), (ptr)) )
18837#define rb_exc_new_cstr(klass,ptr) RB_GNUC_EXTENSION_BLOCK( (__builtin_constant_p(ptr)) ? rb_exc_new((klass), (ptr), (long)strlen(ptr)) : rb_exc_new_cstr((klass), (ptr)) )
18838#define rb_str_new2 rb_str_new_cstr
18839#define rb_str_new3 rb_str_new_shared
18840#define rb_str_new4 rb_str_new_frozen
18841#define rb_str_new5 rb_str_new_with_class
18842#define rb_tainted_str_new2 rb_tainted_str_new_cstr
18843#define rb_str_buf_new2 rb_str_buf_new_cstr
18844#define rb_usascii_str_new2 rb_usascii_str_new_cstr
18845#define rb_str_buf_cat rb_str_cat
18846#define rb_str_buf_cat2 rb_str_cat_cstr
18847#define rb_str_cat2 rb_str_cat_cstr
18848#define rb_strlen_lit(str) (sizeof(str "") - 1)
18849#define rb_str_new_lit(str) rb_str_new_static((str), rb_strlen_lit(str))
18850#define rb_usascii_str_new_lit(str) rb_usascii_str_new_static((str), rb_strlen_lit(str))
18851#define rb_utf8_str_new_lit(str) rb_utf8_str_new_static((str), rb_strlen_lit(str))
18852#define rb_enc_str_new_lit(str,enc) rb_enc_str_new_static((str), rb_strlen_lit(str), (enc))
18853#define rb_str_new_literal(str) rb_str_new_lit(str)
18854#define rb_usascii_str_new_literal(str) rb_usascii_str_new_lit(str)
18855#define rb_utf8_str_new_literal(str) rb_utf8_str_new_lit(str)
18856#define rb_enc_str_new_literal(str,enc) rb_enc_str_new_lit(str, enc)
18857#define RUBY_UBF_IO ((rb_unblock_function_t *)-1)
18858#define RUBY_UBF_PROCESS ((rb_unblock_function_t *)-1)
18859#pragma GCC visibility pop
18860#define rb_f_notimplement_p(f) __builtin_types_compatible_p(__typeof__(f),__typeof__(rb_f_notimplement))
18861#define RB_METHOD_DEFINITION_DECL_C(def,nonnull,defname,decl,vars,funcargs) __attribute__((__unused__,__weakref__(#def),__nonnull__ nonnull))static void defname(RB_UNWRAP_MACRO decl,VALUE(*func)funcargs,int arity);
18862#define RB_UNWRAP_MACRO(...) __VA_ARGS__
18863#define RB_METHOD_DEFINITION_DECL_CXX_BEGIN(def)
18864#define RB_METHOD_DEFINITION_DECL_CXX(def,defname,decl,vars,funcargs,arity)
18865#define RB_METHOD_DEFINITION_DECL_1(def,nonnull,defname,arity,decl,vars,funcargs) RB_METHOD_DEFINITION_DECL_C(def,nonnull,defname,decl,vars,funcargs) RB_METHOD_DEFINITION_DECL_CXX(def,defname,decl,vars,funcargs,arity)
18866#define RB_METHOD_DEFINITION_DECL(def,nonnull,decl,vars) RB_METHOD_DEFINITION_DECL_CXX_BEGIN(def) RB_METHOD_DEFINITION_DECL_1(def,nonnull,def ##0 ,0 ,decl,vars,(VALUE)) RB_METHOD_DEFINITION_DECL_1(def,nonnull,def ##1 ,1 ,decl,vars,(VALUE,VALUE)) RB_METHOD_DEFINITION_DECL_1(def,nonnull,def ##2 ,2 ,decl,vars,(VALUE,VALUE,VALUE)) RB_METHOD_DEFINITION_DECL_1(def,nonnull,def ##3 ,3 ,decl,vars,(VALUE,VALUE,VALUE,VALUE)) RB_METHOD_DEFINITION_DECL_1(def,nonnull,def ##4 ,4 ,decl,vars,(VALUE,VALUE,VALUE,VALUE,VALUE)) RB_METHOD_DEFINITION_DECL_1(def,nonnull,def ##5 ,5 ,decl,vars,(VALUE,VALUE,VALUE,VALUE,VALUE,VALUE)) RB_METHOD_DEFINITION_DECL_1(def,nonnull,def ##6 ,6 ,decl,vars,(VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE)) RB_METHOD_DEFINITION_DECL_1(def,nonnull,def ##7 ,7 ,decl,vars,(VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE)) RB_METHOD_DEFINITION_DECL_1(def,nonnull,def ##8 ,8 ,decl,vars,(VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE)) RB_METHOD_DEFINITION_DECL_1(def,nonnull,def ##9 ,9 ,decl,vars,(VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE)) RB_METHOD_DEFINITION_DECL_1(def,nonnull,def ##10,10,decl,vars,(VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE)) RB_METHOD_DEFINITION_DECL_1(def,nonnull,def ##11,11,decl,vars,(VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE)) RB_METHOD_DEFINITION_DECL_1(def,nonnull,def ##12,12,decl,vars,(VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE)) RB_METHOD_DEFINITION_DECL_1(def,nonnull,def ##13,13,decl,vars,(VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE)) RB_METHOD_DEFINITION_DECL_1(def,nonnull,def ##14,14,decl,vars,(VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE)) RB_METHOD_DEFINITION_DECL_1(def,nonnull,def ##15,15,decl,vars,(VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE,VALUE)) RB_METHOD_DEFINITION_DECL_M3(def,nonnull,def ##m3,decl,vars) RB_METHOD_DEFINITION_DECL_1(def,nonnull,def ##m2,-2,decl,vars,(VALUE,VALUE)) RB_METHOD_DEFINITION_DECL_M1(def,nonnull,def ##m1,decl,vars)
18867#define RB_METHOD_DEFINITION_DECL_M1(def,nonnull,defname,decl,vars) RB_METHOD_DEFINITION_DECL_C(def,nonnull,defname,decl,vars,(int,union{VALUE*x;const VALUE*y;}__attribute__((__transparent_union__)),VALUE))
18868#define RB_METHOD_DEFINITION_DECL_M3(def,nonnull,defname,decl,vars) RB_METHOD_DEFINITION_DECL_C(def,nonnull,defname,decl,vars,())
18869#define rb_define_method_id_choose_prototype15(n) rb_define_method_if_constexpr((n)==15,rb_define_method_id15,rb_define_method_idm3)
18870#define rb_define_method_id_choose_prototype14(n) rb_define_method_if_constexpr((n)==14,rb_define_method_id14,rb_define_method_id_choose_prototype15(n))
18871#define rb_define_method_id_choose_prototype13(n) rb_define_method_if_constexpr((n)==13,rb_define_method_id13,rb_define_method_id_choose_prototype14(n))
18872#define rb_define_method_id_choose_prototype12(n) rb_define_method_if_constexpr((n)==12,rb_define_method_id12,rb_define_method_id_choose_prototype13(n))
18873#define rb_define_method_id_choose_prototype11(n) rb_define_method_if_constexpr((n)==11,rb_define_method_id11,rb_define_method_id_choose_prototype12(n))
18874#define rb_define_method_id_choose_prototype10(n) rb_define_method_if_constexpr((n)==10,rb_define_method_id10,rb_define_method_id_choose_prototype11(n))
18875#define rb_define_method_id_choose_prototype9(n) rb_define_method_if_constexpr((n)== 9,rb_define_method_id9, rb_define_method_id_choose_prototype10(n))
18876#define rb_define_method_id_choose_prototype8(n) rb_define_method_if_constexpr((n)== 8,rb_define_method_id8, rb_define_method_id_choose_prototype9(n))
18877#define rb_define_method_id_choose_prototype7(n) rb_define_method_if_constexpr((n)== 7,rb_define_method_id7, rb_define_method_id_choose_prototype8(n))
18878#define rb_define_method_id_choose_prototype6(n) rb_define_method_if_constexpr((n)== 6,rb_define_method_id6, rb_define_method_id_choose_prototype7(n))
18879#define rb_define_method_id_choose_prototype5(n) rb_define_method_if_constexpr((n)== 5,rb_define_method_id5, rb_define_method_id_choose_prototype6(n))
18880#define rb_define_method_id_choose_prototype4(n) rb_define_method_if_constexpr((n)== 4,rb_define_method_id4, rb_define_method_id_choose_prototype5(n))
18881#define rb_define_method_id_choose_prototype3(n) rb_define_method_if_constexpr((n)== 3,rb_define_method_id3, rb_define_method_id_choose_prototype4(n))
18882#define rb_define_method_id_choose_prototype2(n) rb_define_method_if_constexpr((n)== 2,rb_define_method_id2, rb_define_method_id_choose_prototype3(n))
18883#define rb_define_method_id_choose_prototype1(n) rb_define_method_if_constexpr((n)== 1,rb_define_method_id1, rb_define_method_id_choose_prototype2(n))
18884#define rb_define_method_id_choose_prototype0(n) rb_define_method_if_constexpr((n)== 0,rb_define_method_id0, rb_define_method_id_choose_prototype1(n))
18885#define rb_define_method_id_choose_prototypem1(n) rb_define_method_if_constexpr((n)==-1,rb_define_method_idm1,rb_define_method_id_choose_prototype0(n))
18886#define rb_define_method_id_choose_prototypem2(n) rb_define_method_if_constexpr((n)==-2,rb_define_method_idm2,rb_define_method_id_choose_prototypem1(n))
18887#define rb_define_method_id_choose_prototypem3(n,f) rb_define_method_if_constexpr(rb_f_notimplement_p(f),rb_define_method_idm3,rb_define_method_id_choose_prototypem2(n))
18888#define rb_define_method_id(klass,mid,func,arity) rb_define_method_id_choose_prototypem3((arity),(func))((klass),(mid),(func),(arity));
18889#define rb_define_protected_method_choose_prototype15(n) rb_define_method_if_constexpr((n)==15,rb_define_protected_method15,rb_define_protected_methodm3)
18890#define rb_define_protected_method_choose_prototype14(n) rb_define_method_if_constexpr((n)==14,rb_define_protected_method14,rb_define_protected_method_choose_prototype15(n))
18891#define rb_define_protected_method_choose_prototype13(n) rb_define_method_if_constexpr((n)==13,rb_define_protected_method13,rb_define_protected_method_choose_prototype14(n))
18892#define rb_define_protected_method_choose_prototype12(n) rb_define_method_if_constexpr((n)==12,rb_define_protected_method12,rb_define_protected_method_choose_prototype13(n))
18893#define rb_define_protected_method_choose_prototype11(n) rb_define_method_if_constexpr((n)==11,rb_define_protected_method11,rb_define_protected_method_choose_prototype12(n))
18894#define rb_define_protected_method_choose_prototype10(n) rb_define_method_if_constexpr((n)==10,rb_define_protected_method10,rb_define_protected_method_choose_prototype11(n))
18895#define rb_define_protected_method_choose_prototype9(n) rb_define_method_if_constexpr((n)== 9,rb_define_protected_method9, rb_define_protected_method_choose_prototype10(n))
18896#define rb_define_protected_method_choose_prototype8(n) rb_define_method_if_constexpr((n)== 8,rb_define_protected_method8, rb_define_protected_method_choose_prototype9(n))
18897#define rb_define_protected_method_choose_prototype7(n) rb_define_method_if_constexpr((n)== 7,rb_define_protected_method7, rb_define_protected_method_choose_prototype8(n))
18898#define rb_define_protected_method_choose_prototype6(n) rb_define_method_if_constexpr((n)== 6,rb_define_protected_method6, rb_define_protected_method_choose_prototype7(n))
18899#define rb_define_protected_method_choose_prototype5(n) rb_define_method_if_constexpr((n)== 5,rb_define_protected_method5, rb_define_protected_method_choose_prototype6(n))
18900#define rb_define_protected_method_choose_prototype4(n) rb_define_method_if_constexpr((n)== 4,rb_define_protected_method4, rb_define_protected_method_choose_prototype5(n))
18901#define rb_define_protected_method_choose_prototype3(n) rb_define_method_if_constexpr((n)== 3,rb_define_protected_method3, rb_define_protected_method_choose_prototype4(n))
18902#define rb_define_protected_method_choose_prototype2(n) rb_define_method_if_constexpr((n)== 2,rb_define_protected_method2, rb_define_protected_method_choose_prototype3(n))
18903#define rb_define_protected_method_choose_prototype1(n) rb_define_method_if_constexpr((n)== 1,rb_define_protected_method1, rb_define_protected_method_choose_prototype2(n))
18904#define rb_define_protected_method_choose_prototype0(n) rb_define_method_if_constexpr((n)== 0,rb_define_protected_method0, rb_define_protected_method_choose_prototype1(n))
18905#define rb_define_protected_method_choose_prototypem1(n) rb_define_method_if_constexpr((n)==-1,rb_define_protected_methodm1,rb_define_protected_method_choose_prototype0(n))
18906#define rb_define_protected_method_choose_prototypem2(n) rb_define_method_if_constexpr((n)==-2,rb_define_protected_methodm2,rb_define_protected_method_choose_prototypem1(n))
18907#define rb_define_protected_method_choose_prototypem3(n,f) rb_define_method_if_constexpr(rb_f_notimplement_p(f),rb_define_protected_methodm3,rb_define_protected_method_choose_prototypem2(n))
18908#define rb_define_protected_method(klass,mid,func,arity) rb_define_protected_method_choose_prototypem3((arity),(func))((klass),(mid),(func),(arity));
18909#define rb_define_private_method_choose_prototype15(n) rb_define_method_if_constexpr((n)==15,rb_define_private_method15,rb_define_private_methodm3)
18910#define rb_define_private_method_choose_prototype14(n) rb_define_method_if_constexpr((n)==14,rb_define_private_method14,rb_define_private_method_choose_prototype15(n))
18911#define rb_define_private_method_choose_prototype13(n) rb_define_method_if_constexpr((n)==13,rb_define_private_method13,rb_define_private_method_choose_prototype14(n))
18912#define rb_define_private_method_choose_prototype12(n) rb_define_method_if_constexpr((n)==12,rb_define_private_method12,rb_define_private_method_choose_prototype13(n))
18913#define rb_define_private_method_choose_prototype11(n) rb_define_method_if_constexpr((n)==11,rb_define_private_method11,rb_define_private_method_choose_prototype12(n))
18914#define rb_define_private_method_choose_prototype10(n) rb_define_method_if_constexpr((n)==10,rb_define_private_method10,rb_define_private_method_choose_prototype11(n))
18915#define rb_define_private_method_choose_prototype9(n) rb_define_method_if_constexpr((n)== 9,rb_define_private_method9, rb_define_private_method_choose_prototype10(n))
18916#define rb_define_private_method_choose_prototype8(n) rb_define_method_if_constexpr((n)== 8,rb_define_private_method8, rb_define_private_method_choose_prototype9(n))
18917#define rb_define_private_method_choose_prototype7(n) rb_define_method_if_constexpr((n)== 7,rb_define_private_method7, rb_define_private_method_choose_prototype8(n))
18918#define rb_define_private_method_choose_prototype6(n) rb_define_method_if_constexpr((n)== 6,rb_define_private_method6, rb_define_private_method_choose_prototype7(n))
18919#define rb_define_private_method_choose_prototype5(n) rb_define_method_if_constexpr((n)== 5,rb_define_private_method5, rb_define_private_method_choose_prototype6(n))
18920#define rb_define_private_method_choose_prototype4(n) rb_define_method_if_constexpr((n)== 4,rb_define_private_method4, rb_define_private_method_choose_prototype5(n))
18921#define rb_define_private_method_choose_prototype3(n) rb_define_method_if_constexpr((n)== 3,rb_define_private_method3, rb_define_private_method_choose_prototype4(n))
18922#define rb_define_private_method_choose_prototype2(n) rb_define_method_if_constexpr((n)== 2,rb_define_private_method2, rb_define_private_method_choose_prototype3(n))
18923#define rb_define_private_method_choose_prototype1(n) rb_define_method_if_constexpr((n)== 1,rb_define_private_method1, rb_define_private_method_choose_prototype2(n))
18924#define rb_define_private_method_choose_prototype0(n) rb_define_method_if_constexpr((n)== 0,rb_define_private_method0, rb_define_private_method_choose_prototype1(n))
18925#define rb_define_private_method_choose_prototypem1(n) rb_define_method_if_constexpr((n)==-1,rb_define_private_methodm1,rb_define_private_method_choose_prototype0(n))
18926#define rb_define_private_method_choose_prototypem2(n) rb_define_method_if_constexpr((n)==-2,rb_define_private_methodm2,rb_define_private_method_choose_prototypem1(n))
18927#define rb_define_private_method_choose_prototypem3(n,f) rb_define_method_if_constexpr(rb_f_notimplement_p(f),rb_define_private_methodm3,rb_define_private_method_choose_prototypem2(n))
18928#define rb_define_private_method(klass,mid,func,arity) rb_define_private_method_choose_prototypem3((arity),(func))((klass),(mid),(func),(arity));
18929#define rb_define_singleton_method_choose_prototype15(n) rb_define_method_if_constexpr((n)==15,rb_define_singleton_method15,rb_define_singleton_methodm3)
18930#define rb_define_singleton_method_choose_prototype14(n) rb_define_method_if_constexpr((n)==14,rb_define_singleton_method14,rb_define_singleton_method_choose_prototype15(n))
18931#define rb_define_singleton_method_choose_prototype13(n) rb_define_method_if_constexpr((n)==13,rb_define_singleton_method13,rb_define_singleton_method_choose_prototype14(n))
18932#define rb_define_singleton_method_choose_prototype12(n) rb_define_method_if_constexpr((n)==12,rb_define_singleton_method12,rb_define_singleton_method_choose_prototype13(n))
18933#define rb_define_singleton_method_choose_prototype11(n) rb_define_method_if_constexpr((n)==11,rb_define_singleton_method11,rb_define_singleton_method_choose_prototype12(n))
18934#define rb_define_singleton_method_choose_prototype10(n) rb_define_method_if_constexpr((n)==10,rb_define_singleton_method10,rb_define_singleton_method_choose_prototype11(n))
18935#define rb_define_singleton_method_choose_prototype9(n) rb_define_method_if_constexpr((n)== 9,rb_define_singleton_method9, rb_define_singleton_method_choose_prototype10(n))
18936#define rb_define_singleton_method_choose_prototype8(n) rb_define_method_if_constexpr((n)== 8,rb_define_singleton_method8, rb_define_singleton_method_choose_prototype9(n))
18937#define rb_define_singleton_method_choose_prototype7(n) rb_define_method_if_constexpr((n)== 7,rb_define_singleton_method7, rb_define_singleton_method_choose_prototype8(n))
18938#define rb_define_singleton_method_choose_prototype6(n) rb_define_method_if_constexpr((n)== 6,rb_define_singleton_method6, rb_define_singleton_method_choose_prototype7(n))
18939#define rb_define_singleton_method_choose_prototype5(n) rb_define_method_if_constexpr((n)== 5,rb_define_singleton_method5, rb_define_singleton_method_choose_prototype6(n))
18940#define rb_define_singleton_method_choose_prototype4(n) rb_define_method_if_constexpr((n)== 4,rb_define_singleton_method4, rb_define_singleton_method_choose_prototype5(n))
18941#define rb_define_singleton_method_choose_prototype3(n) rb_define_method_if_constexpr((n)== 3,rb_define_singleton_method3, rb_define_singleton_method_choose_prototype4(n))
18942#define rb_define_singleton_method_choose_prototype2(n) rb_define_method_if_constexpr((n)== 2,rb_define_singleton_method2, rb_define_singleton_method_choose_prototype3(n))
18943#define rb_define_singleton_method_choose_prototype1(n) rb_define_method_if_constexpr((n)== 1,rb_define_singleton_method1, rb_define_singleton_method_choose_prototype2(n))
18944#define rb_define_singleton_method_choose_prototype0(n) rb_define_method_if_constexpr((n)== 0,rb_define_singleton_method0, rb_define_singleton_method_choose_prototype1(n))
18945#define rb_define_singleton_method_choose_prototypem1(n) rb_define_method_if_constexpr((n)==-1,rb_define_singleton_methodm1,rb_define_singleton_method_choose_prototype0(n))
18946#define rb_define_singleton_method_choose_prototypem2(n) rb_define_method_if_constexpr((n)==-2,rb_define_singleton_methodm2,rb_define_singleton_method_choose_prototypem1(n))
18947#define rb_define_singleton_method_choose_prototypem3(n,f) rb_define_method_if_constexpr(rb_f_notimplement_p(f),rb_define_singleton_methodm3,rb_define_singleton_method_choose_prototypem2(n))
18948#define rb_define_singleton_method(klass,mid,func,arity) rb_define_singleton_method_choose_prototypem3((arity),(func))((klass),(mid),(func),(arity));
18949#define FIX_CONST_VALUE_PTR(x) (x)
18950#define RUBY_VM 1
18951#define HAVE_NATIVETHREAD
18952#define RUBY_EVENT_NONE 0x0000
18953#define RUBY_EVENT_LINE 0x0001
18954#define RUBY_EVENT_CLASS 0x0002
18955#define RUBY_EVENT_END 0x0004
18956#define RUBY_EVENT_CALL 0x0008
18957#define RUBY_EVENT_RETURN 0x0010
18958#define RUBY_EVENT_C_CALL 0x0020
18959#define RUBY_EVENT_C_RETURN 0x0040
18960#define RUBY_EVENT_RAISE 0x0080
18961#define RUBY_EVENT_ALL 0x00ff
18962#define RUBY_EVENT_B_CALL 0x0100
18963#define RUBY_EVENT_B_RETURN 0x0200
18964#define RUBY_EVENT_THREAD_BEGIN 0x0400
18965#define RUBY_EVENT_THREAD_END 0x0800
18966#define RUBY_EVENT_FIBER_SWITCH 0x1000
18967#define RUBY_EVENT_SCRIPT_COMPILED 0x2000
18968#define RUBY_EVENT_TRACEPOINT_ALL 0xffff
18969#define RUBY_EVENT_RESERVED_FOR_INTERNAL_USE 0x030000
18970#define RUBY_INTERNAL_EVENT_SWITCH 0x040000
18971#define RUBY_EVENT_SWITCH 0x040000
18972#define RUBY_INTERNAL_EVENT_NEWOBJ 0x100000
18973#define RUBY_INTERNAL_EVENT_FREEOBJ 0x200000
18974#define RUBY_INTERNAL_EVENT_GC_START 0x400000
18975#define RUBY_INTERNAL_EVENT_GC_END_MARK 0x800000
18976#define RUBY_INTERNAL_EVENT_GC_END_SWEEP 0x1000000
18977#define RUBY_INTERNAL_EVENT_GC_ENTER 0x2000000
18978#define RUBY_INTERNAL_EVENT_GC_EXIT 0x4000000
18979#define RUBY_INTERNAL_EVENT_OBJSPACE_MASK 0x7f00000
18980#define RUBY_INTERNAL_EVENT_MASK 0xffff0000
18981#define RB_EVENT_HOOKS_HAVE_CALLBACK_DATA 1
18982#define ISASCII(c) rb_isascii(c)
18983#define ISPRINT(c) rb_isprint(c)
18984#define ISGRAPH(c) rb_isgraph(c)
18985#define ISSPACE(c) rb_isspace(c)
18986#define ISUPPER(c) rb_isupper(c)
18987#define ISLOWER(c) rb_islower(c)
18988#define ISALNUM(c) rb_isalnum(c)
18989#define ISALPHA(c) rb_isalpha(c)
18990#define ISDIGIT(c) rb_isdigit(c)
18991#define ISXDIGIT(c) rb_isxdigit(c)
18992#define ISBLANK(c) rb_isblank(c)
18993#define ISCNTRL(c) rb_iscntrl(c)
18994#define ISPUNCT(c) rb_ispunct(c)
18995#define TOUPPER(c) rb_toupper(c)
18996#define TOLOWER(c) rb_tolower(c)
18997#define STRCASECMP(s1,s2) (st_locale_insensitive_strcasecmp((s1), (s2)))
18998#define STRNCASECMP(s1,s2,n) (st_locale_insensitive_strncasecmp((s1), (s2), (n)))
18999#define STRTOUL(str,endptr,base) (ruby_strtoul((str), (endptr), (base)))
19000#define InitVM(ext) {void InitVM_ ##ext(void);InitVM_ ##ext();}
19001#define rb_scan_args(argc,argvp,fmt,...) __builtin_choose_expr(__builtin_constant_p(fmt), rb_scan_args0(argc,argvp,fmt, (sizeof((VALUE*[]){__VA_ARGS__})/sizeof(VALUE*)), ((VALUE*[]){__VA_ARGS__})), rb_scan_args(argc,argvp,fmt, ##__VA_ARGS__))
19002#define rb_scan_args_isdigit(c) ((unsigned char)((c)-'0')<10)
19003#define rb_scan_args_count_end(fmt,ofs,vari) (fmt[ofs] ? -1 : (vari))
19004#define rb_scan_args_count_block(fmt,ofs,vari) (fmt[ofs]!='&' ? rb_scan_args_count_end(fmt, ofs, vari) : rb_scan_args_count_end(fmt, ofs+1, vari+1))
19005#define rb_scan_args_count_hash(fmt,ofs,vari) (fmt[ofs]!=':' ? rb_scan_args_count_block(fmt, ofs, vari) : rb_scan_args_count_block(fmt, ofs+1, vari+1))
19006#define rb_scan_args_count_trail(fmt,ofs,vari) (!rb_scan_args_isdigit(fmt[ofs]) ? rb_scan_args_count_hash(fmt, ofs, vari) : rb_scan_args_count_hash(fmt, ofs+1, vari+(fmt[ofs]-'0')))
19007#define rb_scan_args_count_var(fmt,ofs,vari) (fmt[ofs]!='*' ? rb_scan_args_count_trail(fmt, ofs, vari) : rb_scan_args_count_trail(fmt, ofs+1, vari+1))
19008#define rb_scan_args_count_opt(fmt,ofs,vari) (!rb_scan_args_isdigit(fmt[ofs]) ? rb_scan_args_count_var(fmt, ofs, vari) : rb_scan_args_count_var(fmt, ofs+1, vari+fmt[ofs]-'0'))
19009#define rb_scan_args_count_lead(fmt,ofs,vari) (!rb_scan_args_isdigit(fmt[ofs]) ? rb_scan_args_count_var(fmt, ofs, vari) : rb_scan_args_count_opt(fmt, ofs+1, vari+fmt[ofs]-'0'))
19010#define rb_scan_args_count(fmt) rb_scan_args_count_lead(fmt, 0, 0)
19011#define rb_scan_args_verify(fmt,varc) (sizeof(char[1-2*(rb_scan_args_count(fmt)<0)])!=1 ? rb_scan_args_bad_format(fmt) : sizeof(char[1-2*(rb_scan_args_count(fmt)!=(varc))])!=1 ? rb_scan_args_length_mismatch(fmt, varc) : (void)0)
19012#define rb_scan_args0(argc,argv,fmt,varc,vars) rb_scan_args_set(argc, argv, rb_scan_args_n_lead(fmt), rb_scan_args_n_opt(fmt), rb_scan_args_n_trail(fmt), rb_scan_args_f_var(fmt), rb_scan_args_f_hash(fmt), rb_scan_args_f_block(fmt), (rb_scan_args_verify(fmt, varc), vars), (char *)fmt, varc)
19013#define rb_yield_values(argc,...) __extension__({ const int rb_yield_values_argc = (argc); const VALUE rb_yield_values_args[] = {__VA_ARGS__}; const int rb_yield_values_nargs = (int)(sizeof(rb_yield_values_args) / sizeof(VALUE)); rb_yield_values2( rb_varargs_argc_check(rb_yield_values_argc, rb_yield_values_nargs), rb_yield_values_nargs ? rb_yield_values_args : NULL); })
19014#define rb_funcall(recv,mid,argc,...) __extension__({ const int rb_funcall_argc = (argc); const VALUE rb_funcall_args[] = {__VA_ARGS__}; const int rb_funcall_nargs = (int)(sizeof(rb_funcall_args) / sizeof(VALUE)); rb_funcallv(recv, mid, rb_varargs_argc_check(rb_funcall_argc, rb_funcall_nargs), rb_funcall_nargs ? rb_funcall_args : NULL); })
19015#define RUBY_SUBST_H 1
19016#undef snprintf
19017#undef vsnprintf
19018#define snprintf ruby_snprintf
19019#define vsnprintf ruby_vsnprintf
19020#define RUBY_INIT_STACK VALUE variable_in_this_stack_frame; ruby_init_stack(&variable_in_this_stack_frame);
19021#pragma GCC visibility pop
19022#define rb_define_method_if_constexpr(x,t,f) __builtin_choose_expr(__builtin_choose_expr(__builtin_constant_p(x),(x),0),(t),(f))
19023#define rb_define_method_choose_prototype15(n) rb_define_method_if_constexpr((n)==15,rb_define_method15,rb_define_methodm3)
19024#define rb_define_method_choose_prototype14(n) rb_define_method_if_constexpr((n)==14,rb_define_method14,rb_define_method_choose_prototype15(n))
19025#define rb_define_method_choose_prototype13(n) rb_define_method_if_constexpr((n)==13,rb_define_method13,rb_define_method_choose_prototype14(n))
19026#define rb_define_method_choose_prototype12(n) rb_define_method_if_constexpr((n)==12,rb_define_method12,rb_define_method_choose_prototype13(n))
19027#define rb_define_method_choose_prototype11(n) rb_define_method_if_constexpr((n)==11,rb_define_method11,rb_define_method_choose_prototype12(n))
19028#define rb_define_method_choose_prototype10(n) rb_define_method_if_constexpr((n)==10,rb_define_method10,rb_define_method_choose_prototype11(n))
19029#define rb_define_method_choose_prototype9(n) rb_define_method_if_constexpr((n)== 9,rb_define_method9, rb_define_method_choose_prototype10(n))
19030#define rb_define_method_choose_prototype8(n) rb_define_method_if_constexpr((n)== 8,rb_define_method8, rb_define_method_choose_prototype9(n))
19031#define rb_define_method_choose_prototype7(n) rb_define_method_if_constexpr((n)== 7,rb_define_method7, rb_define_method_choose_prototype8(n))
19032#define rb_define_method_choose_prototype6(n) rb_define_method_if_constexpr((n)== 6,rb_define_method6, rb_define_method_choose_prototype7(n))
19033#define rb_define_method_choose_prototype5(n) rb_define_method_if_constexpr((n)== 5,rb_define_method5, rb_define_method_choose_prototype6(n))
19034#define rb_define_method_choose_prototype4(n) rb_define_method_if_constexpr((n)== 4,rb_define_method4, rb_define_method_choose_prototype5(n))
19035#define rb_define_method_choose_prototype3(n) rb_define_method_if_constexpr((n)== 3,rb_define_method3, rb_define_method_choose_prototype4(n))
19036#define rb_define_method_choose_prototype2(n) rb_define_method_if_constexpr((n)== 2,rb_define_method2, rb_define_method_choose_prototype3(n))
19037#define rb_define_method_choose_prototype1(n) rb_define_method_if_constexpr((n)== 1,rb_define_method1, rb_define_method_choose_prototype2(n))
19038#define rb_define_method_choose_prototype0(n) rb_define_method_if_constexpr((n)== 0,rb_define_method0, rb_define_method_choose_prototype1(n))
19039#define rb_define_method_choose_prototypem1(n) rb_define_method_if_constexpr((n)==-1,rb_define_methodm1,rb_define_method_choose_prototype0(n))
19040#define rb_define_method_choose_prototypem2(n) rb_define_method_if_constexpr((n)==-2,rb_define_methodm2,rb_define_method_choose_prototypem1(n))
19041#define rb_define_method_choose_prototypem3(n,f) rb_define_method_if_constexpr(rb_f_notimplement_p(f),rb_define_methodm3,rb_define_method_choose_prototypem2(n))
19042#define rb_define_method(klass,mid,func,arity) rb_define_method_choose_prototypem3((arity),(func))((klass),(mid),(func),(arity));
19043#define rb_define_module_function_choose_prototype15(n) rb_define_method_if_constexpr((n)==15,rb_define_module_function15,rb_define_module_functionm3)
19044#define rb_define_module_function_choose_prototype14(n) rb_define_method_if_constexpr((n)==14,rb_define_module_function14,rb_define_module_function_choose_prototype15(n))
19045#define rb_define_module_function_choose_prototype13(n) rb_define_method_if_constexpr((n)==13,rb_define_module_function13,rb_define_module_function_choose_prototype14(n))
19046#define rb_define_module_function_choose_prototype12(n) rb_define_method_if_constexpr((n)==12,rb_define_module_function12,rb_define_module_function_choose_prototype13(n))
19047#define rb_define_module_function_choose_prototype11(n) rb_define_method_if_constexpr((n)==11,rb_define_module_function11,rb_define_module_function_choose_prototype12(n))
19048#define rb_define_module_function_choose_prototype10(n) rb_define_method_if_constexpr((n)==10,rb_define_module_function10,rb_define_module_function_choose_prototype11(n))
19049#define rb_define_module_function_choose_prototype9(n) rb_define_method_if_constexpr((n)== 9,rb_define_module_function9, rb_define_module_function_choose_prototype10(n))
19050#define rb_define_module_function_choose_prototype8(n) rb_define_method_if_constexpr((n)== 8,rb_define_module_function8, rb_define_module_function_choose_prototype9(n))
19051#define rb_define_module_function_choose_prototype7(n) rb_define_method_if_constexpr((n)== 7,rb_define_module_function7, rb_define_module_function_choose_prototype8(n))
19052#define rb_define_module_function_choose_prototype6(n) rb_define_method_if_constexpr((n)== 6,rb_define_module_function6, rb_define_module_function_choose_prototype7(n))
19053#define rb_define_module_function_choose_prototype5(n) rb_define_method_if_constexpr((n)== 5,rb_define_module_function5, rb_define_module_function_choose_prototype6(n))
19054#define rb_define_module_function_choose_prototype4(n) rb_define_method_if_constexpr((n)== 4,rb_define_module_function4, rb_define_module_function_choose_prototype5(n))
19055#define rb_define_module_function_choose_prototype3(n) rb_define_method_if_constexpr((n)== 3,rb_define_module_function3, rb_define_module_function_choose_prototype4(n))
19056#define rb_define_module_function_choose_prototype2(n) rb_define_method_if_constexpr((n)== 2,rb_define_module_function2, rb_define_module_function_choose_prototype3(n))
19057#define rb_define_module_function_choose_prototype1(n) rb_define_method_if_constexpr((n)== 1,rb_define_module_function1, rb_define_module_function_choose_prototype2(n))
19058#define rb_define_module_function_choose_prototype0(n) rb_define_method_if_constexpr((n)== 0,rb_define_module_function0, rb_define_module_function_choose_prototype1(n))
19059#define rb_define_module_function_choose_prototypem1(n) rb_define_method_if_constexpr((n)==-1,rb_define_module_functionm1,rb_define_module_function_choose_prototype0(n))
19060#define rb_define_module_function_choose_prototypem2(n) rb_define_method_if_constexpr((n)==-2,rb_define_module_functionm2,rb_define_module_function_choose_prototypem1(n))
19061#define rb_define_module_function_choose_prototypem3(n,f) rb_define_method_if_constexpr(rb_f_notimplement_p(f),rb_define_module_functionm3,rb_define_module_function_choose_prototypem2(n))
19062#define rb_define_module_function(klass,mid,func,arity) rb_define_module_function_choose_prototypem3((arity),(func))((klass),(mid),(func),(arity));
19063#define rb_define_global_function_choose_prototype15(n) rb_define_method_if_constexpr((n)==15,rb_define_global_function15,rb_define_global_functionm3)
19064#define rb_define_global_function_choose_prototype14(n) rb_define_method_if_constexpr((n)==14,rb_define_global_function14,rb_define_global_function_choose_prototype15(n))
19065#define rb_define_global_function_choose_prototype13(n) rb_define_method_if_constexpr((n)==13,rb_define_global_function13,rb_define_global_function_choose_prototype14(n))
19066#define rb_define_global_function_choose_prototype12(n) rb_define_method_if_constexpr((n)==12,rb_define_global_function12,rb_define_global_function_choose_prototype13(n))
19067#define rb_define_global_function_choose_prototype11(n) rb_define_method_if_constexpr((n)==11,rb_define_global_function11,rb_define_global_function_choose_prototype12(n))
19068#define rb_define_global_function_choose_prototype10(n) rb_define_method_if_constexpr((n)==10,rb_define_global_function10,rb_define_global_function_choose_prototype11(n))
19069#define rb_define_global_function_choose_prototype9(n) rb_define_method_if_constexpr((n)== 9,rb_define_global_function9, rb_define_global_function_choose_prototype10(n))
19070#define rb_define_global_function_choose_prototype8(n) rb_define_method_if_constexpr((n)== 8,rb_define_global_function8, rb_define_global_function_choose_prototype9(n))
19071#define rb_define_global_function_choose_prototype7(n) rb_define_method_if_constexpr((n)== 7,rb_define_global_function7, rb_define_global_function_choose_prototype8(n))
19072#define rb_define_global_function_choose_prototype6(n) rb_define_method_if_constexpr((n)== 6,rb_define_global_function6, rb_define_global_function_choose_prototype7(n))
19073#define rb_define_global_function_choose_prototype5(n) rb_define_method_if_constexpr((n)== 5,rb_define_global_function5, rb_define_global_function_choose_prototype6(n))
19074#define rb_define_global_function_choose_prototype4(n) rb_define_method_if_constexpr((n)== 4,rb_define_global_function4, rb_define_global_function_choose_prototype5(n))
19075#define rb_define_global_function_choose_prototype3(n) rb_define_method_if_constexpr((n)== 3,rb_define_global_function3, rb_define_global_function_choose_prototype4(n))
19076#define rb_define_global_function_choose_prototype2(n) rb_define_method_if_constexpr((n)== 2,rb_define_global_function2, rb_define_global_function_choose_prototype3(n))
19077#define rb_define_global_function_choose_prototype1(n) rb_define_method_if_constexpr((n)== 1,rb_define_global_function1, rb_define_global_function_choose_prototype2(n))
19078#define rb_define_global_function_choose_prototype0(n) rb_define_method_if_constexpr((n)== 0,rb_define_global_function0, rb_define_global_function_choose_prototype1(n))
19079#define rb_define_global_function_choose_prototypem1(n) rb_define_method_if_constexpr((n)==-1,rb_define_global_functionm1,rb_define_global_function_choose_prototype0(n))
19080#define rb_define_global_function_choose_prototypem2(n) rb_define_method_if_constexpr((n)==-2,rb_define_global_functionm2,rb_define_global_function_choose_prototypem1(n))
19081#define rb_define_global_function_choose_prototypem3(n,f) rb_define_method_if_constexpr(rb_f_notimplement_p(f),rb_define_global_functionm3,rb_define_global_function_choose_prototypem2(n))
19082#define rb_define_global_function(mid,func,arity) rb_define_global_function_choose_prototypem3((arity),(func))((mid),(func),(arity));
19083#define RUBY_METHOD_FUNC(func) ((VALUE (*)(ANYARGS))(func))
19084#define _STDBOOL_H
19085#define bool _Bool
19086#define true 1
19087#define false 0
19088#define __bool_true_false_are_defined 1
19089#define HALF_LONG_MSB ((SIGNED_VALUE)1<<((SIZEOF_LONG*CHAR_BIT-1)/2))
19090#define LIKELY(x) RB_LIKELY(x)
19091#define UNLIKELY(x) RB_UNLIKELY(x)
19092#define __has_feature(x) 0
19093#define __has_extension __has_feature
19094#define ATTRIBUTE_NO_ADDRESS_SAFETY_ANALYSIS(x) NO_SANITIZE("address", NOINLINE(x))
19095#undef NO_SANITIZE
19096#define NO_SANITIZE(x,y) COMPILER_WARNING_PUSH; COMPILER_WARNING_IGNORED(-Wattributes); __attribute__((__no_sanitize__(x))) y; COMPILER_WARNING_POP
19097#define __MEMCHECK_H
19098#define __VALGRIND_H
19099#define __VALGRIND_MAJOR__ 3
19100#define __VALGRIND_MINOR__ 15
19101#undef PLAT_x86_darwin
19102#undef PLAT_amd64_darwin
19103#undef PLAT_x86_win32
19104#undef PLAT_amd64_win64
19105#undef PLAT_x86_linux
19106#undef PLAT_amd64_linux
19107#undef PLAT_ppc32_linux
19108#undef PLAT_ppc64be_linux
19109#undef PLAT_ppc64le_linux
19110#undef PLAT_arm_linux
19111#undef PLAT_arm64_linux
19112#undef PLAT_s390x_linux
19113#undef PLAT_mips32_linux
19114#undef PLAT_mips64_linux
19115#undef PLAT_x86_solaris
19116#undef PLAT_amd64_solaris
19117#define PLAT_amd64_linux 1
19118#define VALGRIND_DO_CLIENT_REQUEST(_zzq_rlval,_zzq_default,_zzq_request,_zzq_arg1,_zzq_arg2,_zzq_arg3,_zzq_arg4,_zzq_arg5) do { (_zzq_rlval) = VALGRIND_DO_CLIENT_REQUEST_EXPR((_zzq_default), (_zzq_request), (_zzq_arg1), (_zzq_arg2), (_zzq_arg3), (_zzq_arg4), (_zzq_arg5)); } while (0)
19119#define VALGRIND_DO_CLIENT_REQUEST_STMT(_zzq_request,_zzq_arg1,_zzq_arg2,_zzq_arg3,_zzq_arg4,_zzq_arg5) do { (void) VALGRIND_DO_CLIENT_REQUEST_EXPR(0, (_zzq_request), (_zzq_arg1), (_zzq_arg2), (_zzq_arg3), (_zzq_arg4), (_zzq_arg5)); } while (0)
19120#define __SPECIAL_INSTRUCTION_PREAMBLE "rolq $3, %%rdi ; rolq $13, %%rdi\n\t" "rolq $61, %%rdi ; rolq $51, %%rdi\n\t"
19121#define VALGRIND_DO_CLIENT_REQUEST_EXPR(_zzq_default,_zzq_request,_zzq_arg1,_zzq_arg2,_zzq_arg3,_zzq_arg4,_zzq_arg5) __extension__ ({ volatile unsigned long int _zzq_args[6]; volatile unsigned long int _zzq_result; _zzq_args[0] = (unsigned long int)(_zzq_request); _zzq_args[1] = (unsigned long int)(_zzq_arg1); _zzq_args[2] = (unsigned long int)(_zzq_arg2); _zzq_args[3] = (unsigned long int)(_zzq_arg3); _zzq_args[4] = (unsigned long int)(_zzq_arg4); _zzq_args[5] = (unsigned long int)(_zzq_arg5); __asm__ volatile(__SPECIAL_INSTRUCTION_PREAMBLE "xchgq %%rbx,%%rbx" : "=d" (_zzq_result) : "a" (&_zzq_args[0]), "0" (_zzq_default) : "cc", "memory" ); _zzq_result; })
19122#define VALGRIND_GET_NR_CONTEXT(_zzq_rlval) { volatile OrigFn* _zzq_orig = &(_zzq_rlval); volatile unsigned long int __addr; __asm__ volatile(__SPECIAL_INSTRUCTION_PREAMBLE "xchgq %%rcx,%%rcx" : "=a" (__addr) : : "cc", "memory" ); _zzq_orig->nraddr = __addr; }
19123#define VALGRIND_CALL_NOREDIR_RAX __SPECIAL_INSTRUCTION_PREAMBLE "xchgq %%rdx,%%rdx\n\t"
19124#define VALGRIND_VEX_INJECT_IR() do { __asm__ volatile(__SPECIAL_INSTRUCTION_PREAMBLE "xchgq %%rdi,%%rdi\n\t" : : : "cc", "memory" ); } while (0)
19125#define VG_CONCAT4(_aa,_bb,_cc,_dd) _aa ##_bb ##_cc ##_dd
19126#define I_WRAP_SONAME_FNNAME_ZU(soname,fnname) VG_CONCAT4(_vgw00000ZU_,soname,_,fnname)
19127#define I_WRAP_SONAME_FNNAME_ZZ(soname,fnname) VG_CONCAT4(_vgw00000ZZ_,soname,_,fnname)
19128#define VALGRIND_GET_ORIG_FN(_lval) VALGRIND_GET_NR_CONTEXT(_lval)
19129#define I_REPLACE_SONAME_FNNAME_ZU(soname,fnname) VG_CONCAT4(_vgr00000ZU_,soname,_,fnname)
19130#define I_REPLACE_SONAME_FNNAME_ZZ(soname,fnname) VG_CONCAT4(_vgr00000ZZ_,soname,_,fnname)
19131#define CALL_FN_v_v(fnptr) do { volatile unsigned long _junk; CALL_FN_W_v(_junk,fnptr); } while (0)
19132#define CALL_FN_v_W(fnptr,arg1) do { volatile unsigned long _junk; CALL_FN_W_W(_junk,fnptr,arg1); } while (0)
19133#define CALL_FN_v_WW(fnptr,arg1,arg2) do { volatile unsigned long _junk; CALL_FN_W_WW(_junk,fnptr,arg1,arg2); } while (0)
19134#define CALL_FN_v_WWW(fnptr,arg1,arg2,arg3) do { volatile unsigned long _junk; CALL_FN_W_WWW(_junk,fnptr,arg1,arg2,arg3); } while (0)
19135#define CALL_FN_v_WWWW(fnptr,arg1,arg2,arg3,arg4) do { volatile unsigned long _junk; CALL_FN_W_WWWW(_junk,fnptr,arg1,arg2,arg3,arg4); } while (0)
19136#define CALL_FN_v_5W(fnptr,arg1,arg2,arg3,arg4,arg5) do { volatile unsigned long _junk; CALL_FN_W_5W(_junk,fnptr,arg1,arg2,arg3,arg4,arg5); } while (0)
19137#define CALL_FN_v_6W(fnptr,arg1,arg2,arg3,arg4,arg5,arg6) do { volatile unsigned long _junk; CALL_FN_W_6W(_junk,fnptr,arg1,arg2,arg3,arg4,arg5,arg6); } while (0)
19138#define CALL_FN_v_7W(fnptr,arg1,arg2,arg3,arg4,arg5,arg6,arg7) do { volatile unsigned long _junk; CALL_FN_W_7W(_junk,fnptr,arg1,arg2,arg3,arg4,arg5,arg6,arg7); } while (0)
19139#define __CALLER_SAVED_REGS "rcx", "rdx", "rsi", "rdi", "r8", "r9", "r10", "r11"
19140#define __FRAME_POINTER ,"r"(__builtin_dwarf_cfa())
19141#define VALGRIND_CFI_PROLOGUE "movq %%rbp, %%r15\n\t" "movq %2, %%rbp\n\t" ".cfi_remember_state\n\t" ".cfi_def_cfa rbp, 0\n\t"
19142#define VALGRIND_CFI_EPILOGUE "movq %%r15, %%rbp\n\t" ".cfi_restore_state\n\t"
19143#define VALGRIND_ALIGN_STACK "movq %%rsp,%%r14\n\t" "andq $0xfffffffffffffff0,%%rsp\n\t"
19144#define VALGRIND_RESTORE_STACK "movq %%r14,%%rsp\n\t"
19145#define CALL_FN_W_v(lval,orig) do { volatile OrigFn _orig = (orig); volatile unsigned long _argvec[1]; volatile unsigned long _res; _argvec[0] = (unsigned long)_orig.nraddr; __asm__ volatile( VALGRIND_CFI_PROLOGUE VALGRIND_ALIGN_STACK "subq $128,%%rsp\n\t" "movq (%%rax), %%rax\n\t" VALGRIND_CALL_NOREDIR_RAX VALGRIND_RESTORE_STACK VALGRIND_CFI_EPILOGUE : "=a" (_res) : "a" (&_argvec[0]) __FRAME_POINTER : "cc", "memory", __CALLER_SAVED_REGS, "r14", "r15" ); lval = (__typeof__(lval)) _res; } while (0)
19146#define CALL_FN_W_W(lval,orig,arg1) do { volatile OrigFn _orig = (orig); volatile unsigned long _argvec[2]; volatile unsigned long _res; _argvec[0] = (unsigned long)_orig.nraddr; _argvec[1] = (unsigned long)(arg1); __asm__ volatile( VALGRIND_CFI_PROLOGUE VALGRIND_ALIGN_STACK "subq $128,%%rsp\n\t" "movq 8(%%rax), %%rdi\n\t" "movq (%%rax), %%rax\n\t" VALGRIND_CALL_NOREDIR_RAX VALGRIND_RESTORE_STACK VALGRIND_CFI_EPILOGUE : "=a" (_res) : "a" (&_argvec[0]) __FRAME_POINTER : "cc", "memory", __CALLER_SAVED_REGS, "r14", "r15" ); lval = (__typeof__(lval)) _res; } while (0)
19147#define CALL_FN_W_WW(lval,orig,arg1,arg2) do { volatile OrigFn _orig = (orig); volatile unsigned long _argvec[3]; volatile unsigned long _res; _argvec[0] = (unsigned long)_orig.nraddr; _argvec[1] = (unsigned long)(arg1); _argvec[2] = (unsigned long)(arg2); __asm__ volatile( VALGRIND_CFI_PROLOGUE VALGRIND_ALIGN_STACK "subq $128,%%rsp\n\t" "movq 16(%%rax), %%rsi\n\t" "movq 8(%%rax), %%rdi\n\t" "movq (%%rax), %%rax\n\t" VALGRIND_CALL_NOREDIR_RAX VALGRIND_RESTORE_STACK VALGRIND_CFI_EPILOGUE : "=a" (_res) : "a" (&_argvec[0]) __FRAME_POINTER : "cc", "memory", __CALLER_SAVED_REGS, "r14", "r15" ); lval = (__typeof__(lval)) _res; } while (0)
19148#define CALL_FN_W_WWW(lval,orig,arg1,arg2,arg3) do { volatile OrigFn _orig = (orig); volatile unsigned long _argvec[4]; volatile unsigned long _res; _argvec[0] = (unsigned long)_orig.nraddr; _argvec[1] = (unsigned long)(arg1); _argvec[2] = (unsigned long)(arg2); _argvec[3] = (unsigned long)(arg3); __asm__ volatile( VALGRIND_CFI_PROLOGUE VALGRIND_ALIGN_STACK "subq $128,%%rsp\n\t" "movq 24(%%rax), %%rdx\n\t" "movq 16(%%rax), %%rsi\n\t" "movq 8(%%rax), %%rdi\n\t" "movq (%%rax), %%rax\n\t" VALGRIND_CALL_NOREDIR_RAX VALGRIND_RESTORE_STACK VALGRIND_CFI_EPILOGUE : "=a" (_res) : "a" (&_argvec[0]) __FRAME_POINTER : "cc", "memory", __CALLER_SAVED_REGS, "r14", "r15" ); lval = (__typeof__(lval)) _res; } while (0)
19149#define CALL_FN_W_WWWW(lval,orig,arg1,arg2,arg3,arg4) do { volatile OrigFn _orig = (orig); volatile unsigned long _argvec[5]; volatile unsigned long _res; _argvec[0] = (unsigned long)_orig.nraddr; _argvec[1] = (unsigned long)(arg1); _argvec[2] = (unsigned long)(arg2); _argvec[3] = (unsigned long)(arg3); _argvec[4] = (unsigned long)(arg4); __asm__ volatile( VALGRIND_CFI_PROLOGUE VALGRIND_ALIGN_STACK "subq $128,%%rsp\n\t" "movq 32(%%rax), %%rcx\n\t" "movq 24(%%rax), %%rdx\n\t" "movq 16(%%rax), %%rsi\n\t" "movq 8(%%rax), %%rdi\n\t" "movq (%%rax), %%rax\n\t" VALGRIND_CALL_NOREDIR_RAX VALGRIND_RESTORE_STACK VALGRIND_CFI_EPILOGUE : "=a" (_res) : "a" (&_argvec[0]) __FRAME_POINTER : "cc", "memory", __CALLER_SAVED_REGS, "r14", "r15" ); lval = (__typeof__(lval)) _res; } while (0)
19150#define CALL_FN_W_5W(lval,orig,arg1,arg2,arg3,arg4,arg5) do { volatile OrigFn _orig = (orig); volatile unsigned long _argvec[6]; volatile unsigned long _res; _argvec[0] = (unsigned long)_orig.nraddr; _argvec[1] = (unsigned long)(arg1); _argvec[2] = (unsigned long)(arg2); _argvec[3] = (unsigned long)(arg3); _argvec[4] = (unsigned long)(arg4); _argvec[5] = (unsigned long)(arg5); __asm__ volatile( VALGRIND_CFI_PROLOGUE VALGRIND_ALIGN_STACK "subq $128,%%rsp\n\t" "movq 40(%%rax), %%r8\n\t" "movq 32(%%rax), %%rcx\n\t" "movq 24(%%rax), %%rdx\n\t" "movq 16(%%rax), %%rsi\n\t" "movq 8(%%rax), %%rdi\n\t" "movq (%%rax), %%rax\n\t" VALGRIND_CALL_NOREDIR_RAX VALGRIND_RESTORE_STACK VALGRIND_CFI_EPILOGUE : "=a" (_res) : "a" (&_argvec[0]) __FRAME_POINTER : "cc", "memory", __CALLER_SAVED_REGS, "r14", "r15" ); lval = (__typeof__(lval)) _res; } while (0)
19151#define CALL_FN_W_6W(lval,orig,arg1,arg2,arg3,arg4,arg5,arg6) do { volatile OrigFn _orig = (orig); volatile unsigned long _argvec[7]; volatile unsigned long _res; _argvec[0] = (unsigned long)_orig.nraddr; _argvec[1] = (unsigned long)(arg1); _argvec[2] = (unsigned long)(arg2); _argvec[3] = (unsigned long)(arg3); _argvec[4] = (unsigned long)(arg4); _argvec[5] = (unsigned long)(arg5); _argvec[6] = (unsigned long)(arg6); __asm__ volatile( VALGRIND_CFI_PROLOGUE VALGRIND_ALIGN_STACK "subq $128,%%rsp\n\t" "movq 48(%%rax), %%r9\n\t" "movq 40(%%rax), %%r8\n\t" "movq 32(%%rax), %%rcx\n\t" "movq 24(%%rax), %%rdx\n\t" "movq 16(%%rax), %%rsi\n\t" "movq 8(%%rax), %%rdi\n\t" "movq (%%rax), %%rax\n\t" VALGRIND_CALL_NOREDIR_RAX VALGRIND_RESTORE_STACK VALGRIND_CFI_EPILOGUE : "=a" (_res) : "a" (&_argvec[0]) __FRAME_POINTER : "cc", "memory", __CALLER_SAVED_REGS, "r14", "r15" ); lval = (__typeof__(lval)) _res; } while (0)
19152#define CALL_FN_W_7W(lval,orig,arg1,arg2,arg3,arg4,arg5,arg6,arg7) do { volatile OrigFn _orig = (orig); volatile unsigned long _argvec[8]; volatile unsigned long _res; _argvec[0] = (unsigned long)_orig.nraddr; _argvec[1] = (unsigned long)(arg1); _argvec[2] = (unsigned long)(arg2); _argvec[3] = (unsigned long)(arg3); _argvec[4] = (unsigned long)(arg4); _argvec[5] = (unsigned long)(arg5); _argvec[6] = (unsigned long)(arg6); _argvec[7] = (unsigned long)(arg7); __asm__ volatile( VALGRIND_CFI_PROLOGUE VALGRIND_ALIGN_STACK "subq $136,%%rsp\n\t" "pushq 56(%%rax)\n\t" "movq 48(%%rax), %%r9\n\t" "movq 40(%%rax), %%r8\n\t" "movq 32(%%rax), %%rcx\n\t" "movq 24(%%rax), %%rdx\n\t" "movq 16(%%rax), %%rsi\n\t" "movq 8(%%rax), %%rdi\n\t" "movq (%%rax), %%rax\n\t" VALGRIND_CALL_NOREDIR_RAX VALGRIND_RESTORE_STACK VALGRIND_CFI_EPILOGUE : "=a" (_res) : "a" (&_argvec[0]) __FRAME_POINTER : "cc", "memory", __CALLER_SAVED_REGS, "r14", "r15" ); lval = (__typeof__(lval)) _res; } while (0)
19153#define CALL_FN_W_8W(lval,orig,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8) do { volatile OrigFn _orig = (orig); volatile unsigned long _argvec[9]; volatile unsigned long _res; _argvec[0] = (unsigned long)_orig.nraddr; _argvec[1] = (unsigned long)(arg1); _argvec[2] = (unsigned long)(arg2); _argvec[3] = (unsigned long)(arg3); _argvec[4] = (unsigned long)(arg4); _argvec[5] = (unsigned long)(arg5); _argvec[6] = (unsigned long)(arg6); _argvec[7] = (unsigned long)(arg7); _argvec[8] = (unsigned long)(arg8); __asm__ volatile( VALGRIND_CFI_PROLOGUE VALGRIND_ALIGN_STACK "subq $128,%%rsp\n\t" "pushq 64(%%rax)\n\t" "pushq 56(%%rax)\n\t" "movq 48(%%rax), %%r9\n\t" "movq 40(%%rax), %%r8\n\t" "movq 32(%%rax), %%rcx\n\t" "movq 24(%%rax), %%rdx\n\t" "movq 16(%%rax), %%rsi\n\t" "movq 8(%%rax), %%rdi\n\t" "movq (%%rax), %%rax\n\t" VALGRIND_CALL_NOREDIR_RAX VALGRIND_RESTORE_STACK VALGRIND_CFI_EPILOGUE : "=a" (_res) : "a" (&_argvec[0]) __FRAME_POINTER : "cc", "memory", __CALLER_SAVED_REGS, "r14", "r15" ); lval = (__typeof__(lval)) _res; } while (0)
19154#define CALL_FN_W_9W(lval,orig,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9) do { volatile OrigFn _orig = (orig); volatile unsigned long _argvec[10]; volatile unsigned long _res; _argvec[0] = (unsigned long)_orig.nraddr; _argvec[1] = (unsigned long)(arg1); _argvec[2] = (unsigned long)(arg2); _argvec[3] = (unsigned long)(arg3); _argvec[4] = (unsigned long)(arg4); _argvec[5] = (unsigned long)(arg5); _argvec[6] = (unsigned long)(arg6); _argvec[7] = (unsigned long)(arg7); _argvec[8] = (unsigned long)(arg8); _argvec[9] = (unsigned long)(arg9); __asm__ volatile( VALGRIND_CFI_PROLOGUE VALGRIND_ALIGN_STACK "subq $136,%%rsp\n\t" "pushq 72(%%rax)\n\t" "pushq 64(%%rax)\n\t" "pushq 56(%%rax)\n\t" "movq 48(%%rax), %%r9\n\t" "movq 40(%%rax), %%r8\n\t" "movq 32(%%rax), %%rcx\n\t" "movq 24(%%rax), %%rdx\n\t" "movq 16(%%rax), %%rsi\n\t" "movq 8(%%rax), %%rdi\n\t" "movq (%%rax), %%rax\n\t" VALGRIND_CALL_NOREDIR_RAX VALGRIND_RESTORE_STACK VALGRIND_CFI_EPILOGUE : "=a" (_res) : "a" (&_argvec[0]) __FRAME_POINTER : "cc", "memory", __CALLER_SAVED_REGS, "r14", "r15" ); lval = (__typeof__(lval)) _res; } while (0)
19155#define CALL_FN_W_10W(lval,orig,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10) do { volatile OrigFn _orig = (orig); volatile unsigned long _argvec[11]; volatile unsigned long _res; _argvec[0] = (unsigned long)_orig.nraddr; _argvec[1] = (unsigned long)(arg1); _argvec[2] = (unsigned long)(arg2); _argvec[3] = (unsigned long)(arg3); _argvec[4] = (unsigned long)(arg4); _argvec[5] = (unsigned long)(arg5); _argvec[6] = (unsigned long)(arg6); _argvec[7] = (unsigned long)(arg7); _argvec[8] = (unsigned long)(arg8); _argvec[9] = (unsigned long)(arg9); _argvec[10] = (unsigned long)(arg10); __asm__ volatile( VALGRIND_CFI_PROLOGUE VALGRIND_ALIGN_STACK "subq $128,%%rsp\n\t" "pushq 80(%%rax)\n\t" "pushq 72(%%rax)\n\t" "pushq 64(%%rax)\n\t" "pushq 56(%%rax)\n\t" "movq 48(%%rax), %%r9\n\t" "movq 40(%%rax), %%r8\n\t" "movq 32(%%rax), %%rcx\n\t" "movq 24(%%rax), %%rdx\n\t" "movq 16(%%rax), %%rsi\n\t" "movq 8(%%rax), %%rdi\n\t" "movq (%%rax), %%rax\n\t" VALGRIND_CALL_NOREDIR_RAX VALGRIND_RESTORE_STACK VALGRIND_CFI_EPILOGUE : "=a" (_res) : "a" (&_argvec[0]) __FRAME_POINTER : "cc", "memory", __CALLER_SAVED_REGS, "r14", "r15" ); lval = (__typeof__(lval)) _res; } while (0)
19156#define CALL_FN_W_11W(lval,orig,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11) do { volatile OrigFn _orig = (orig); volatile unsigned long _argvec[12]; volatile unsigned long _res; _argvec[0] = (unsigned long)_orig.nraddr; _argvec[1] = (unsigned long)(arg1); _argvec[2] = (unsigned long)(arg2); _argvec[3] = (unsigned long)(arg3); _argvec[4] = (unsigned long)(arg4); _argvec[5] = (unsigned long)(arg5); _argvec[6] = (unsigned long)(arg6); _argvec[7] = (unsigned long)(arg7); _argvec[8] = (unsigned long)(arg8); _argvec[9] = (unsigned long)(arg9); _argvec[10] = (unsigned long)(arg10); _argvec[11] = (unsigned long)(arg11); __asm__ volatile( VALGRIND_CFI_PROLOGUE VALGRIND_ALIGN_STACK "subq $136,%%rsp\n\t" "pushq 88(%%rax)\n\t" "pushq 80(%%rax)\n\t" "pushq 72(%%rax)\n\t" "pushq 64(%%rax)\n\t" "pushq 56(%%rax)\n\t" "movq 48(%%rax), %%r9\n\t" "movq 40(%%rax), %%r8\n\t" "movq 32(%%rax), %%rcx\n\t" "movq 24(%%rax), %%rdx\n\t" "movq 16(%%rax), %%rsi\n\t" "movq 8(%%rax), %%rdi\n\t" "movq (%%rax), %%rax\n\t" VALGRIND_CALL_NOREDIR_RAX VALGRIND_RESTORE_STACK VALGRIND_CFI_EPILOGUE : "=a" (_res) : "a" (&_argvec[0]) __FRAME_POINTER : "cc", "memory", __CALLER_SAVED_REGS, "r14", "r15" ); lval = (__typeof__(lval)) _res; } while (0)
19157#define CALL_FN_W_12W(lval,orig,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12) do { volatile OrigFn _orig = (orig); volatile unsigned long _argvec[13]; volatile unsigned long _res; _argvec[0] = (unsigned long)_orig.nraddr; _argvec[1] = (unsigned long)(arg1); _argvec[2] = (unsigned long)(arg2); _argvec[3] = (unsigned long)(arg3); _argvec[4] = (unsigned long)(arg4); _argvec[5] = (unsigned long)(arg5); _argvec[6] = (unsigned long)(arg6); _argvec[7] = (unsigned long)(arg7); _argvec[8] = (unsigned long)(arg8); _argvec[9] = (unsigned long)(arg9); _argvec[10] = (unsigned long)(arg10); _argvec[11] = (unsigned long)(arg11); _argvec[12] = (unsigned long)(arg12); __asm__ volatile( VALGRIND_CFI_PROLOGUE VALGRIND_ALIGN_STACK "subq $128,%%rsp\n\t" "pushq 96(%%rax)\n\t" "pushq 88(%%rax)\n\t" "pushq 80(%%rax)\n\t" "pushq 72(%%rax)\n\t" "pushq 64(%%rax)\n\t" "pushq 56(%%rax)\n\t" "movq 48(%%rax), %%r9\n\t" "movq 40(%%rax), %%r8\n\t" "movq 32(%%rax), %%rcx\n\t" "movq 24(%%rax), %%rdx\n\t" "movq 16(%%rax), %%rsi\n\t" "movq 8(%%rax), %%rdi\n\t" "movq (%%rax), %%rax\n\t" VALGRIND_CALL_NOREDIR_RAX VALGRIND_RESTORE_STACK VALGRIND_CFI_EPILOGUE : "=a" (_res) : "a" (&_argvec[0]) __FRAME_POINTER : "cc", "memory", __CALLER_SAVED_REGS, "r14", "r15" ); lval = (__typeof__(lval)) _res; } while (0)
19158#define VG_USERREQ_TOOL_BASE(a,b) ((unsigned int)(((a)&0xff) << 24 | ((b)&0xff) << 16))
19159#define VG_IS_TOOL_USERREQ(a,b,v) (VG_USERREQ_TOOL_BASE(a,b) == ((v) & 0xffff0000))
19160#define RUNNING_ON_VALGRIND (unsigned)VALGRIND_DO_CLIENT_REQUEST_EXPR(0 , VG_USERREQ__RUNNING_ON_VALGRIND, 0, 0, 0, 0, 0)
19161#define VALGRIND_DISCARD_TRANSLATIONS(_qzz_addr,_qzz_len) VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__DISCARD_TRANSLATIONS, _qzz_addr, _qzz_len, 0, 0, 0)
19162#define VALGRIND_INNER_THREADS(_qzz_addr) VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__INNER_THREADS, _qzz_addr, 0, 0, 0, 0)
19163#define VALGRIND_NON_SIMD_CALL0(_qyy_fn) VALGRIND_DO_CLIENT_REQUEST_EXPR(0 , VG_USERREQ__CLIENT_CALL0, _qyy_fn, 0, 0, 0, 0)
19164#define VALGRIND_NON_SIMD_CALL1(_qyy_fn,_qyy_arg1) VALGRIND_DO_CLIENT_REQUEST_EXPR(0 , VG_USERREQ__CLIENT_CALL1, _qyy_fn, _qyy_arg1, 0, 0, 0)
19165#define VALGRIND_NON_SIMD_CALL2(_qyy_fn,_qyy_arg1,_qyy_arg2) VALGRIND_DO_CLIENT_REQUEST_EXPR(0 , VG_USERREQ__CLIENT_CALL2, _qyy_fn, _qyy_arg1, _qyy_arg2, 0, 0)
19166#define VALGRIND_NON_SIMD_CALL3(_qyy_fn,_qyy_arg1,_qyy_arg2,_qyy_arg3) VALGRIND_DO_CLIENT_REQUEST_EXPR(0 , VG_USERREQ__CLIENT_CALL3, _qyy_fn, _qyy_arg1, _qyy_arg2, _qyy_arg3, 0)
19167#define VALGRIND_COUNT_ERRORS (unsigned)VALGRIND_DO_CLIENT_REQUEST_EXPR( 0 , VG_USERREQ__COUNT_ERRORS, 0, 0, 0, 0, 0)
19168#define VALGRIND_MALLOCLIKE_BLOCK(addr,sizeB,rzB,is_zeroed) VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__MALLOCLIKE_BLOCK, addr, sizeB, rzB, is_zeroed, 0)
19169#define VALGRIND_RESIZEINPLACE_BLOCK(addr,oldSizeB,newSizeB,rzB) VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__RESIZEINPLACE_BLOCK, addr, oldSizeB, newSizeB, rzB, 0)
19170#define VALGRIND_FREELIKE_BLOCK(addr,rzB) VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__FREELIKE_BLOCK, addr, rzB, 0, 0, 0)
19171#define VALGRIND_CREATE_MEMPOOL(pool,rzB,is_zeroed) VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__CREATE_MEMPOOL, pool, rzB, is_zeroed, 0, 0)
19172#define VALGRIND_MEMPOOL_AUTO_FREE 1
19173#define VALGRIND_MEMPOOL_METAPOOL 2
19174#define VALGRIND_CREATE_MEMPOOL_EXT(pool,rzB,is_zeroed,flags) VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__CREATE_MEMPOOL, pool, rzB, is_zeroed, flags, 0)
19175#define VALGRIND_DESTROY_MEMPOOL(pool) VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__DESTROY_MEMPOOL, pool, 0, 0, 0, 0)
19176#define VALGRIND_MEMPOOL_ALLOC(pool,addr,size) VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__MEMPOOL_ALLOC, pool, addr, size, 0, 0)
19177#define VALGRIND_MEMPOOL_FREE(pool,addr) VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__MEMPOOL_FREE, pool, addr, 0, 0, 0)
19178#define VALGRIND_MEMPOOL_TRIM(pool,addr,size) VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__MEMPOOL_TRIM, pool, addr, size, 0, 0)
19179#define VALGRIND_MOVE_MEMPOOL(poolA,poolB) VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__MOVE_MEMPOOL, poolA, poolB, 0, 0, 0)
19180#define VALGRIND_MEMPOOL_CHANGE(pool,addrA,addrB,size) VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__MEMPOOL_CHANGE, pool, addrA, addrB, size, 0)
19181#define VALGRIND_MEMPOOL_EXISTS(pool) (unsigned)VALGRIND_DO_CLIENT_REQUEST_EXPR(0, VG_USERREQ__MEMPOOL_EXISTS, pool, 0, 0, 0, 0)
19182#define VALGRIND_STACK_REGISTER(start,end) (unsigned)VALGRIND_DO_CLIENT_REQUEST_EXPR(0, VG_USERREQ__STACK_REGISTER, start, end, 0, 0, 0)
19183#define VALGRIND_STACK_DEREGISTER(id) VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__STACK_DEREGISTER, id, 0, 0, 0, 0)
19184#define VALGRIND_STACK_CHANGE(id,start,end) VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__STACK_CHANGE, id, start, end, 0, 0)
19185#define VALGRIND_LOAD_PDB_DEBUGINFO(fd,ptr,total_size,delta) VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__LOAD_PDB_DEBUGINFO, fd, ptr, total_size, delta, 0)
19186#define VALGRIND_MAP_IP_TO_SRCLOC(addr,buf64) (unsigned)VALGRIND_DO_CLIENT_REQUEST_EXPR(0, VG_USERREQ__MAP_IP_TO_SRCLOC, addr, buf64, 0, 0, 0)
19187#define VALGRIND_DISABLE_ERROR_REPORTING VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__CHANGE_ERR_DISABLEMENT, 1, 0, 0, 0, 0)
19188#define VALGRIND_ENABLE_ERROR_REPORTING VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__CHANGE_ERR_DISABLEMENT, -1, 0, 0, 0, 0)
19189#define VALGRIND_MONITOR_COMMAND(command) VALGRIND_DO_CLIENT_REQUEST_EXPR(0, VG_USERREQ__GDB_MONITOR_COMMAND, command, 0, 0, 0, 0)
19190#undef PLAT_x86_darwin
19191#undef PLAT_amd64_darwin
19192#undef PLAT_x86_win32
19193#undef PLAT_amd64_win64
19194#undef PLAT_x86_linux
19195#undef PLAT_amd64_linux
19196#undef PLAT_ppc32_linux
19197#undef PLAT_ppc64be_linux
19198#undef PLAT_ppc64le_linux
19199#undef PLAT_arm_linux
19200#undef PLAT_s390x_linux
19201#undef PLAT_mips32_linux
19202#undef PLAT_mips64_linux
19203#undef PLAT_x86_solaris
19204#undef PLAT_amd64_solaris
19205#define VALGRIND_MAKE_MEM_NOACCESS(_qzz_addr,_qzz_len) VALGRIND_DO_CLIENT_REQUEST_EXPR(0 , VG_USERREQ__MAKE_MEM_NOACCESS, (_qzz_addr), (_qzz_len), 0, 0, 0)
19206#define VALGRIND_MAKE_MEM_UNDEFINED(_qzz_addr,_qzz_len) VALGRIND_DO_CLIENT_REQUEST_EXPR(0 , VG_USERREQ__MAKE_MEM_UNDEFINED, (_qzz_addr), (_qzz_len), 0, 0, 0)
19207#define VALGRIND_MAKE_MEM_DEFINED(_qzz_addr,_qzz_len) VALGRIND_DO_CLIENT_REQUEST_EXPR(0 , VG_USERREQ__MAKE_MEM_DEFINED, (_qzz_addr), (_qzz_len), 0, 0, 0)
19208#define VALGRIND_MAKE_MEM_DEFINED_IF_ADDRESSABLE(_qzz_addr,_qzz_len) VALGRIND_DO_CLIENT_REQUEST_EXPR(0 , VG_USERREQ__MAKE_MEM_DEFINED_IF_ADDRESSABLE, (_qzz_addr), (_qzz_len), 0, 0, 0)
19209#define VALGRIND_CREATE_BLOCK(_qzz_addr,_qzz_len,_qzz_desc) VALGRIND_DO_CLIENT_REQUEST_EXPR(0 , VG_USERREQ__CREATE_BLOCK, (_qzz_addr), (_qzz_len), (_qzz_desc), 0, 0)
19210#define VALGRIND_DISCARD(_qzz_blkindex) VALGRIND_DO_CLIENT_REQUEST_EXPR(0 , VG_USERREQ__DISCARD, 0, (_qzz_blkindex), 0, 0, 0)
19211#define VALGRIND_CHECK_MEM_IS_ADDRESSABLE(_qzz_addr,_qzz_len) VALGRIND_DO_CLIENT_REQUEST_EXPR(0, VG_USERREQ__CHECK_MEM_IS_ADDRESSABLE, (_qzz_addr), (_qzz_len), 0, 0, 0)
19212#define VALGRIND_CHECK_MEM_IS_DEFINED(_qzz_addr,_qzz_len) VALGRIND_DO_CLIENT_REQUEST_EXPR(0, VG_USERREQ__CHECK_MEM_IS_DEFINED, (_qzz_addr), (_qzz_len), 0, 0, 0)
19213#define VALGRIND_CHECK_VALUE_IS_DEFINED(__lvalue) VALGRIND_CHECK_MEM_IS_DEFINED( (volatile unsigned char *)&(__lvalue), (unsigned long)(sizeof (__lvalue)))
19214#define VALGRIND_DO_LEAK_CHECK VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__DO_LEAK_CHECK, 0, 0, 0, 0, 0)
19215#define VALGRIND_DO_ADDED_LEAK_CHECK VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__DO_LEAK_CHECK, 0, 1, 0, 0, 0)
19216#define VALGRIND_DO_CHANGED_LEAK_CHECK VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__DO_LEAK_CHECK, 0, 2, 0, 0, 0)
19217#define VALGRIND_DO_QUICK_LEAK_CHECK VALGRIND_DO_CLIENT_REQUEST_STMT(VG_USERREQ__DO_LEAK_CHECK, 1, 0, 0, 0, 0)
19218#define VALGRIND_COUNT_LEAKS(leaked,dubious,reachable,suppressed) { unsigned long _qzz_leaked = 0, _qzz_dubious = 0; unsigned long _qzz_reachable = 0, _qzz_suppressed = 0; VALGRIND_DO_CLIENT_REQUEST_STMT( VG_USERREQ__COUNT_LEAKS, &_qzz_leaked, &_qzz_dubious, &_qzz_reachable, &_qzz_suppressed, 0); leaked = _qzz_leaked; dubious = _qzz_dubious; reachable = _qzz_reachable; suppressed = _qzz_suppressed; }
19219#define VALGRIND_COUNT_LEAK_BLOCKS(leaked,dubious,reachable,suppressed) { unsigned long _qzz_leaked = 0, _qzz_dubious = 0; unsigned long _qzz_reachable = 0, _qzz_suppressed = 0; VALGRIND_DO_CLIENT_REQUEST_STMT( VG_USERREQ__COUNT_LEAK_BLOCKS, &_qzz_leaked, &_qzz_dubious, &_qzz_reachable, &_qzz_suppressed, 0); leaked = _qzz_leaked; dubious = _qzz_dubious; reachable = _qzz_reachable; suppressed = _qzz_suppressed; }
19220#define VALGRIND_GET_VBITS(zza,zzvbits,zznbytes) (unsigned)VALGRIND_DO_CLIENT_REQUEST_EXPR(0, VG_USERREQ__GET_VBITS, (const char*)(zza), (char*)(zzvbits), (zznbytes), 0, 0)
19221#define VALGRIND_SET_VBITS(zza,zzvbits,zznbytes) (unsigned)VALGRIND_DO_CLIENT_REQUEST_EXPR(0, VG_USERREQ__SET_VBITS, (const char*)(zza), (const char*)(zzvbits), (zznbytes), 0, 0 )
19222#define VALGRIND_DISABLE_ADDR_ERROR_REPORTING_IN_RANGE(_qzz_addr,_qzz_len) VALGRIND_DO_CLIENT_REQUEST_EXPR(0 , VG_USERREQ__DISABLE_ADDR_ERROR_REPORTING_IN_RANGE, (_qzz_addr), (_qzz_len), 0, 0, 0)
19223#define VALGRIND_ENABLE_ADDR_ERROR_REPORTING_IN_RANGE(_qzz_addr,_qzz_len) VALGRIND_DO_CLIENT_REQUEST_EXPR(0 , VG_USERREQ__ENABLE_ADDR_ERROR_REPORTING_IN_RANGE, (_qzz_addr), (_qzz_len), 0, 0, 0)
19224#define numberof(array) ((int)(sizeof(array) / sizeof((array)[0])))
19225#define ACCESS_ONCE(type,x) (*((volatile type *)&(x)))
19226#define STATIC_ASSERT(name,expr) RB_GNUC_EXTENSION _Static_assert(expr, #name ": " #expr)
19227#define SIGNED_INTEGER_TYPE_P(int_type) (0 > ((int_type)0)-1)
19228#define SIGNED_INTEGER_MAX(sint_type) (sint_type) ((((sint_type)1) << (sizeof(sint_type) * CHAR_BIT - 2)) | ((((sint_type)1) << (sizeof(sint_type) * CHAR_BIT - 2)) - 1))
19229#define SIGNED_INTEGER_MIN(sint_type) (-SIGNED_INTEGER_MAX(sint_type)-1)
19230#define UNSIGNED_INTEGER_MAX(uint_type) (~(uint_type)0)
19231#define TIMET_MAX SIGNED_INTEGER_MAX(time_t)
19232#define TIMET_MIN SIGNED_INTEGER_MIN(time_t)
19233#define TIMET_MAX_PLUS_ONE (2*(double)(TIMET_MAX/2+1))
19234#define MUL_OVERFLOW_P(a,b) __builtin_mul_overflow_p((a), (b), (__typeof__(a * b))0)
19235#define MUL_OVERFLOW_SIGNED_INTEGER_P(a,b,min,max) ( (a) == 0 ? 0 : (a) == -1 ? (b) < -(max) : (a) > 0 ? ((b) > 0 ? (max) / (a) < (b) : (min) / (a) > (b)) : ((b) > 0 ? (min) / (a) < (b) : (max) / (a) > (b)))
19236#define MUL_OVERFLOW_FIXNUM_P(a,b) RB_GNUC_EXTENSION_BLOCK( struct { long fixnum : SIZEOF_LONG * CHAR_BIT - 1; } c; __builtin_mul_overflow_p((a), (b), c.fixnum); )
19237#define MUL_OVERFLOW_LONG_LONG_P(a,b) MUL_OVERFLOW_P(a, b)
19238#define MUL_OVERFLOW_LONG_P(a,b) MUL_OVERFLOW_P(a, b)
19239#define MUL_OVERFLOW_INT_P(a,b) MUL_OVERFLOW_P(a, b)
19240#define swap16(x) __builtin_bswap16(x)
19241#define swap32(x) __builtin_bswap32(x)
19242#define swap64(x) __builtin_bswap64(x)
19243#define DLONG int128_t
19244#define DL2NUM(x) (RB_FIXABLE(x) ? LONG2FIX(x) : rb_int128t2big(x))
19245#define bit_length(x) (unsigned int) (sizeof(x) <= SIZEOF_INT ? SIZEOF_INT * CHAR_BIT - nlz_int((unsigned int)(x)) : sizeof(x) <= SIZEOF_LONG ? SIZEOF_LONG * CHAR_BIT - nlz_long((unsigned long)(x)) : sizeof(x) <= SIZEOF_LONG_LONG ? SIZEOF_LONG_LONG * CHAR_BIT - nlz_long_long((unsigned LONG_LONG)(x)) : SIZEOF_INT128_T * CHAR_BIT - nlz_int128((uint128_t)(x)))
19246#define BDIGIT unsigned int
19247#define SIZEOF_BDIGIT SIZEOF_INT
19248#define BDIGIT_DBL unsigned LONG_LONG
19249#define BDIGIT_DBL_SIGNED LONG_LONG
19250#define PRI_BDIGIT_PREFIX ""
19251#define PRI_BDIGIT_DBL_PREFIX PRI_LL_PREFIX
19252#define SIZEOF_ACTUAL_BDIGIT SIZEOF_BDIGIT
19253#define PRIdBDIGIT PRI_BDIGIT_PREFIX"d"
19254#define PRIiBDIGIT PRI_BDIGIT_PREFIX"i"
19255#define PRIoBDIGIT PRI_BDIGIT_PREFIX"o"
19256#define PRIuBDIGIT PRI_BDIGIT_PREFIX"u"
19257#define PRIxBDIGIT PRI_BDIGIT_PREFIX"x"
19258#define PRIXBDIGIT PRI_BDIGIT_PREFIX"X"
19259#define PRIdBDIGIT_DBL PRI_BDIGIT_DBL_PREFIX"d"
19260#define PRIiBDIGIT_DBL PRI_BDIGIT_DBL_PREFIX"i"
19261#define PRIoBDIGIT_DBL PRI_BDIGIT_DBL_PREFIX"o"
19262#define PRIuBDIGIT_DBL PRI_BDIGIT_DBL_PREFIX"u"
19263#define PRIxBDIGIT_DBL PRI_BDIGIT_DBL_PREFIX"x"
19264#define PRIXBDIGIT_DBL PRI_BDIGIT_DBL_PREFIX"X"
19265#define BIGNUM_EMBED_LEN_NUMBITS 3
19266#define BIGNUM_EMBED_LEN_MAX (SIZEOF_VALUE*RVALUE_EMBED_LEN_MAX/SIZEOF_ACTUAL_BDIGIT)
19267#define BIGNUM_SIGN_BIT ((VALUE)FL_USER1)
19268#define BIGNUM_SIGN(b) ((RBASIC(b)->flags & BIGNUM_SIGN_BIT) != 0)
19269#define BIGNUM_SET_SIGN(b,sign) ((sign) ? (RBASIC(b)->flags |= BIGNUM_SIGN_BIT) : (RBASIC(b)->flags &= ~BIGNUM_SIGN_BIT))
19270#define BIGNUM_POSITIVE_P(b) BIGNUM_SIGN(b)
19271#define BIGNUM_NEGATIVE_P(b) (!BIGNUM_SIGN(b))
19272#define BIGNUM_NEGATE(b) (RBASIC(b)->flags ^= BIGNUM_SIGN_BIT)
19273#define BIGNUM_EMBED_FLAG ((VALUE)FL_USER2)
19274#define BIGNUM_EMBED_LEN_MASK (~(~(VALUE)0U << BIGNUM_EMBED_LEN_NUMBITS) << BIGNUM_EMBED_LEN_SHIFT)
19275#define BIGNUM_EMBED_LEN_SHIFT (FL_USHIFT+3)
19276#define BIGNUM_LEN(b) ((RBASIC(b)->flags & BIGNUM_EMBED_FLAG) ? (size_t)((RBASIC(b)->flags >> BIGNUM_EMBED_LEN_SHIFT) & (BIGNUM_EMBED_LEN_MASK >> BIGNUM_EMBED_LEN_SHIFT)) : RBIGNUM(b)->as.heap.len)
19277#define BIGNUM_DIGITS(b) ((RBASIC(b)->flags & BIGNUM_EMBED_FLAG) ? RBIGNUM(b)->as.ary : RBIGNUM(b)->as.heap.digits)
19278#define BIGNUM_LENINT(b) rb_long2int(BIGNUM_LEN(b))
19279#define RBIGNUM(obj) (R_CAST(RBignum)(obj))
19280#define RRATIONAL(obj) (R_CAST(RRational)(obj))
19281#define RRATIONAL_SET_NUM(rat,n) RB_OBJ_WRITE((rat), &((struct RRational *)(rat))->num,(n))
19282#define RRATIONAL_SET_DEN(rat,d) RB_OBJ_WRITE((rat), &((struct RRational *)(rat))->den,(d))
19283#define RFLOAT(obj) (R_CAST(RFloat)(obj))
19284#define RCOMPLEX(obj) (R_CAST(RComplex)(obj))
19285#define RCOMPLEX_SET_REAL(cmp,r) RB_OBJ_WRITE((cmp), &((struct RComplex *)(cmp))->real,(r))
19286#define RCOMPLEX_SET_IMAG(cmp,i) RB_OBJ_WRITE((cmp), &((struct RComplex *)(cmp))->imag,(i))
19287#define RHASH_AR_TABLE_MAX_SIZE SIZEOF_VALUE
19288#define RHASH_LEV_MASK (FL_USER13 | FL_USER14 | FL_USER15 | FL_USER16 | FL_USER17 | FL_USER18 | FL_USER19)
19289#define RHASH_AR_TABLE_SIZE_RAW(h) ((unsigned int)((RBASIC(h)->flags & RHASH_AR_TABLE_SIZE_MASK) >> RHASH_AR_TABLE_SIZE_SHIFT))
19290#define RHASH_AR_TABLE_P(hash) (!FL_TEST_RAW((hash), RHASH_ST_TABLE_FLAG))
19291#define RHASH_AR_TABLE(hash) (RHASH(hash)->as.ar)
19292#define RHASH_ST_TABLE(hash) (RHASH(hash)->as.st)
19293#define RHASH(obj) (R_CAST(RHash)(obj))
19294#define RHASH_ST_SIZE(h) (RHASH_ST_TABLE(h)->num_entries)
19295#define RHASH_ST_TABLE_P(h) (!RHASH_AR_TABLE_P(h))
19296#define RHASH_ST_CLEAR(h) (FL_UNSET_RAW(h, RHASH_ST_TABLE_FLAG), RHASH(h)->as.ar = NULL)
19297#define RHASH_AR_TABLE_SIZE_MASK (VALUE)RHASH_AR_TABLE_SIZE_MASK
19298#define RHASH_AR_TABLE_SIZE_SHIFT RHASH_AR_TABLE_SIZE_SHIFT
19299#define RHASH_AR_TABLE_BOUND_MASK (VALUE)RHASH_AR_TABLE_BOUND_MASK
19300#define RHASH_AR_TABLE_BOUND_SHIFT RHASH_AR_TABLE_BOUND_SHIFT
19301#define RHASH_TRANSIENT_P(hash) FL_TEST_RAW((hash), RHASH_TRANSIENT_FLAG)
19302#define RHASH_SET_TRANSIENT_FLAG(h) FL_SET_RAW(h, RHASH_TRANSIENT_FLAG)
19303#define RHASH_UNSET_TRANSIENT_FLAG(h) FL_UNSET_RAW(h, RHASH_TRANSIENT_FLAG)
19304#undef RHASH_IFNONE
19305#undef RHASH_SIZE
19306#define RHASH_IFNONE(h) (RHASH(h)->ifnone)
19307#define RHASH_SIZE(h) (RHASH_AR_TABLE_P(h) ? RHASH_AR_TABLE_SIZE_RAW(h) : RHASH_ST_SIZE(h))
19308#define RSTRUCT_EMBED_LEN_MAX RSTRUCT_EMBED_LEN_MAX
19309#define RSTRUCT_EMBED_LEN_MASK RSTRUCT_EMBED_LEN_MASK
19310#define RSTRUCT_EMBED_LEN_SHIFT RSTRUCT_EMBED_LEN_SHIFT
19311#define RSTRUCT_TRANSIENT_P(st) FL_TEST_RAW((obj), RSTRUCT_TRANSIENT_FLAG)
19312#define RSTRUCT_TRANSIENT_SET(st) FL_SET_RAW((st), RSTRUCT_TRANSIENT_FLAG)
19313#define RSTRUCT_TRANSIENT_UNSET(st) FL_UNSET_RAW((st), RSTRUCT_TRANSIENT_FLAG)
19314#undef RSTRUCT_LEN
19315#undef RSTRUCT_PTR
19316#undef RSTRUCT_SET
19317#undef RSTRUCT_GET
19318#define RSTRUCT_EMBED_LEN(st) (long)((RBASIC(st)->flags >> RSTRUCT_EMBED_LEN_SHIFT) & (RSTRUCT_EMBED_LEN_MASK >> RSTRUCT_EMBED_LEN_SHIFT))
19319#define RSTRUCT_LEN(st) rb_struct_len(st)
19320#define RSTRUCT_LENINT(st) rb_long2int(RSTRUCT_LEN(st))
19321#define RSTRUCT_CONST_PTR(st) rb_struct_const_ptr(st)
19322#define RSTRUCT_PTR(st) ((VALUE *)RSTRUCT_CONST_PTR(RB_OBJ_WB_UNPROTECT_FOR(STRUCT, st)))
19323#define RSTRUCT_SET(st,idx,v) RB_OBJ_WRITE(st, &RSTRUCT_CONST_PTR(st)[idx], (v))
19324#define RSTRUCT_GET(st,idx) (RSTRUCT_CONST_PTR(st)[idx])
19325#define RSTRUCT(obj) (R_CAST(RStruct)(obj))
19326#define SERIALT2NUM ULL2NUM
19327#define PRI_SERIALT_PREFIX PRI_LL_PREFIX
19328#define SIZEOF_SERIAL_T SIZEOF_LONG_LONG
19329#undef RClass
19330#define RCLASS_EXT(c) (RCLASS(c)->ptr)
19331#define RCLASS_IV_TBL(c) (RCLASS_EXT(c)->iv_tbl)
19332#define RCLASS_CONST_TBL(c) (RCLASS_EXT(c)->const_tbl)
19333#define RCLASS_M_TBL(c) (RCLASS_EXT(c)->m_tbl)
19334#define RCLASS_CALLABLE_M_TBL(c) (RCLASS_EXT(c)->callable_m_tbl)
19335#define RCLASS_IV_INDEX_TBL(c) (RCLASS_EXT(c)->iv_index_tbl)
19336#define RCLASS_ORIGIN(c) (RCLASS_EXT(c)->origin_)
19337#define RCLASS_REFINED_CLASS(c) (RCLASS_EXT(c)->refined_class)
19338#define RCLASS_SERIAL(c) (RCLASS(c)->class_serial)
19339#define RCLASS_INCLUDER(c) (RCLASS_EXT(c)->includer)
19340#define RCLASS_CLONED FL_USER6
19341#define RICLASS_IS_ORIGIN FL_USER5
19342#define RCLASS_REFINED_BY_ANY FL_USER7
19343#undef RCLASS_SUPER
19344#define IMEMO_DEBUG 0
19345#define IMEMO_MASK 0x0f
19346#define IMEMO_FL_USHIFT (FL_USHIFT + 4)
19347#define IMEMO_FL_USER0 FL_USER4
19348#define IMEMO_FL_USER1 FL_USER5
19349#define IMEMO_FL_USER2 FL_USER6
19350#define IMEMO_FL_USER3 FL_USER7
19351#define IMEMO_FL_USER4 FL_USER8
19352#define THROW_DATA_CONSUMED IMEMO_FL_USER0
19353#define THROW_DATA_P(err) RB_TYPE_P((VALUE)(err), T_IMEMO)
19354#define IFUNC_NEW(a,b,c) ((struct vm_ifunc *)rb_imemo_new(imemo_ifunc, (VALUE)(a), (VALUE)(b), (VALUE)(c), 0))
19355#define rb_imemo_tmpbuf_auto_free_pointer() rb_imemo_new(imemo_tmpbuf, 0, 0, 0, 0)
19356#define RB_IMEMO_TMPBUF_PTR(v) ((void *)(((const struct rb_imemo_tmpbuf_struct *)(v))->ptr))
19357#define MEMO_V1_SET(m,v) RB_OBJ_WRITE((m), &(m)->v1, (v))
19358#define MEMO_V2_SET(m,v) RB_OBJ_WRITE((m), &(m)->v2, (v))
19359#define MEMO_CAST(m) ((struct MEMO *)m)
19360#define MEMO_NEW(a,b,c) ((struct MEMO *)rb_imemo_new(imemo_memo, (VALUE)(a), (VALUE)(b), (VALUE)(c), 0))
19361#define roomof(x,y) (((x) + (y) - 1) / (y))
19362#define type_roomof(x,y) roomof(sizeof(x), sizeof(y))
19363#define MEMO_FOR(type,value) ((type *)RARRAY_PTR(value))
19364#define NEW_MEMO_FOR(type,value) ((value) = rb_ary_tmp_new_fill(type_roomof(type, VALUE)), MEMO_FOR(type, value))
19365#define NEW_PARTIAL_MEMO_FOR(type,value,member) ((value) = rb_ary_tmp_new_fill(type_roomof(type, VALUE)), rb_ary_set_len((value), offsetof(type, member) / sizeof(VALUE)), MEMO_FOR(type, value))
19366#define STRING_P(s) (RB_TYPE_P((s), T_STRING) && CLASS_OF(s) == rb_cString)
19367#define rb_cFixnum rb_cInteger
19368#define rb_cBignum rb_cInteger
19369#define NEW_CMP_OPT_MEMO(type,value) NEW_PARTIAL_MEMO_FOR(type, value, cmp_opt)
19370#define CMP_OPTIMIZABLE_BIT(type) (1U << TOKEN_PASTE(cmp_opt_,type))
19371#define CMP_OPTIMIZABLE(data,type) (((data).opt_inited & CMP_OPTIMIZABLE_BIT(type)) ? ((data).opt_methods & CMP_OPTIMIZABLE_BIT(type)) : (((data).opt_inited |= CMP_OPTIMIZABLE_BIT(type)), rb_method_basic_definition_p(TOKEN_PASTE(rb_c,type), id_cmp) && ((data).opt_methods |= CMP_OPTIMIZABLE_BIT(type))))
19372#define OPTIMIZED_CMP(a,b,data) ((FIXNUM_P(a) && FIXNUM_P(b) && CMP_OPTIMIZABLE(data, Fixnum)) ? (((long)a > (long)b) ? 1 : ((long)a < (long)b) ? -1 : 0) : (STRING_P(a) && STRING_P(b) && CMP_OPTIMIZABLE(data, String)) ? rb_str_cmp(a, b) : (RB_FLOAT_TYPE_P(a) && RB_FLOAT_TYPE_P(b) && CMP_OPTIMIZABLE(data, Float)) ? rb_float_cmp(a, b) : rb_cmpint(rb_funcallv(a, id_cmp, 1, &b), a, b))
19373#define ARRAY_DEBUG (0+RUBY_DEBUG)
19374#define RARRAY_PTR_IN_USE_FLAG FL_USER14
19375#define ARY_PTR_USING_P(ary) FL_TEST_RAW((ary), RARRAY_PTR_IN_USE_FLAG)
19376#define RARY_TRANSIENT_SET(ary) FL_SET_RAW((ary), RARRAY_TRANSIENT_FLAG);
19377#define RARY_TRANSIENT_UNSET(ary) FL_UNSET_RAW((ary), RARRAY_TRANSIENT_FLAG);
19378#define rb_ary_new_from_args(n,...) __extension__ ({ const VALUE args_to_new_ary[] = {__VA_ARGS__}; if (__builtin_constant_p(n)) { STATIC_ASSERT(rb_ary_new_from_args, numberof(args_to_new_ary) == (n)); } rb_ary_new_from_values(numberof(args_to_new_ary), args_to_new_ary); })
19379#define rp(obj) rb_obj_info_dump_loc((VALUE)(obj), __FILE__, __LINE__, __func__)
19380#define rp_m(msg,obj) do { fprintf(stderr, "%s", (msg)); rb_obj_info_dump((VALUE)obj); } while (0)
19381#define bp() ruby_debug_breakpoint()
19382#define rb_raise_cstr(etype,mesg) rb_exc_raise(rb_exc_new_str(etype, rb_str_new_cstr(mesg)))
19383#define rb_raise_static(etype,mesg) rb_exc_raise(rb_exc_new_str(etype, rb_str_new_static(mesg, rb_strlen_lit(mesg))))
19384#define rb_name_err_raise_str(mesg,recv,name) rb_exc_raise(rb_name_err_new(mesg, recv, name))
19385#define rb_name_err_raise(mesg,recv,name) rb_name_err_raise_str(rb_fstring_cstr(mesg), (recv), (name))
19386#define rb_key_err_raise(mesg,recv,name) rb_exc_raise(rb_key_err_new(mesg, recv, name))
19387#define id_signo ruby_static_id_signo
19388#define id_status ruby_static_id_status
19389#pragma GCC visibility push(default)
19390#pragma GCC visibility pop
19391#define rb_sys_fail_path(path) rb_sys_fail_path_in(RUBY_FUNCTION_NAME_STRING, path)
19392#define rb_syserr_fail_path(err,path) rb_syserr_fail_path_in(RUBY_FUNCTION_NAME_STRING, (err), (path))
19393#define ruby_sized_xrealloc(ptr,new_size,old_size) ruby_xrealloc(ptr, new_size)
19394#define ruby_sized_xrealloc2(ptr,new_count,element_size,old_count) ruby_xrealloc2(ptr, new_count, element_size)
19395#define ruby_sized_xfree(ptr,size) ruby_xfree(ptr)
19396#define SIZED_REALLOC_N(var,type,n,old_n) REALLOC_N(var, type, n)
19397#undef NEWOBJF_OF
19398#undef RB_NEWOBJ_OF
19399#define RB_NEWOBJ_OF(obj,type,klass,flags) type *(obj) = (type*)(((flags) & FL_WB_PROTECTED) ? rb_wb_protected_newobj_of(klass, (flags) & ~FL_WB_PROTECTED) : rb_wb_unprotected_newobj_of(klass, flags))
19400#define NEWOBJ_OF(obj,type,klass,flags) RB_NEWOBJ_OF(obj,type,klass,flags)
19401#define RHASH_TBL_RAW(h) rb_hash_tbl_raw(h)
19402#pragma GCC visibility push(default)
19403#pragma GCC visibility pop
19404#define rb_io_fptr_finalize rb_io_fptr_finalize_internal
19405#define FIXNUM_POSITIVE_P(num) ((SIGNED_VALUE)(num) > (SIGNED_VALUE)INT2FIX(0))
19406#define FIXNUM_NEGATIVE_P(num) ((SIGNED_VALUE)(num) < 0)
19407#define FIXNUM_ZERO_P(num) ((num) == INT2FIX(0))
19408#define INT_NEGATIVE_P(x) (FIXNUM_P(x) ? FIXNUM_NEGATIVE_P(x) : BIGNUM_NEGATIVE_P(x))
19409#define FLOAT_ZERO_P(x) (RFLOAT_VALUE(x) == 0.0)
19410#define ROUND_DEFAULT RUBY_NUM_ROUND_HALF_UP
19411#define ROUND_TO(mode,even,up,down) ((mode) == RUBY_NUM_ROUND_HALF_EVEN ? even : (mode) == RUBY_NUM_ROUND_HALF_UP ? up : down)
19412#define ROUND_FUNC(mode,name) ROUND_TO(mode, name ##_half_even, name ##_half_up, name ##_half_down)
19413#define ROUND_CALL(mode,name,args) ROUND_TO(mode, name ##_half_even args, name ##_half_up args, name ##_half_down args)
19414#define RUBY_BIT_ROTL(v,n) (((v) << (n)) | ((v) >> ((sizeof(v) * 8) - n)))
19415#define RUBY_BIT_ROTR(v,n) (((v) >> (n)) | ((v) << ((sizeof(v) * 8) - n)))
19416#define rb_float_value(v) rb_float_value_inline(v)
19417#define rb_float_new(d) rb_float_new_inline(d)
19418#define RBASIC_CLEAR_CLASS(obj) memset(&(((struct RBasicRaw *)((VALUE)(obj)))->klass), 0, sizeof(VALUE))
19419#define RBASIC_SET_CLASS_RAW(obj,cls) memcpy(&((struct RBasicRaw *)((VALUE)(obj)))->klass, &(cls), sizeof(VALUE))
19420#define RBASIC_SET_CLASS(obj,cls) do { VALUE _obj_ = (obj); RB_OBJ_WRITE(_obj_, &((struct RBasicRaw *)(_obj_))->klass, cls); } while (0)
19421#define USE_SYMBOL_GC 1
19422#pragma GCC visibility push(default)
19423#pragma GCC visibility pop
19424#define RB_MAX_GROUPS (65536)
19425#define ARGVSTR2ARGV(argv_str) ((char **)RB_IMEMO_TMPBUF_PTR(argv_str) + 1)
19426#define RANGE_BEG(r) (RSTRUCT(r)->as.ary[0])
19427#define RANGE_END(r) (RSTRUCT(r)->as.ary[1])
19428#define RANGE_EXCL(r) (RSTRUCT(r)->as.ary[2])
19429#define rb_fstring_lit(str) rb_fstring_new((str), rb_strlen_lit(str))
19430#define rb_fstring_literal(str) rb_fstring_lit(str)
19431#define rb_fstring_cstr(str) RB_GNUC_EXTENSION_BLOCK( (__builtin_constant_p(str)) ? rb_fstring_new((str), (long)strlen(str)) : rb_fstring_cstr(str) )
19432#define QUOTE(str) rb_str_quote_unprintable(str)
19433#define QUOTE_ID(id) rb_id_quote_unprintable(id)
19434#define STR_NOEMBED FL_USER1
19435#define STR_SHARED FL_USER2
19436#define STR_EMBED_P(str) (!FL_TEST_RAW((str), STR_NOEMBED))
19437#define STR_SHARED_P(s) FL_ALL_RAW((s), STR_NOEMBED|ELTS_SHARED)
19438#define is_ascii_string(str) (rb_enc_str_coderange(str) == ENC_CODERANGE_7BIT)
19439#define is_broken_string(str) (rb_enc_str_coderange(str) == ENC_CODERANGE_BROKEN)
19440#define rb_sym_intern_ascii_cstr(ptr) __extension__ ( { (__builtin_constant_p(ptr)) ? rb_sym_intern_ascii((ptr), (long)strlen(ptr)) : rb_sym_intern_ascii_cstr(ptr); })
19441#define COVERAGE_INDEX_LINES 0
19442#define COVERAGE_INDEX_BRANCHES 1
19443#define COVERAGE_TARGET_LINES 1
19444#define COVERAGE_TARGET_BRANCHES 2
19445#define COVERAGE_TARGET_METHODS 4
19446#define COVERAGE_TARGET_ONESHOT_LINES 8
19447#define ROBJECT_TRANSIENT_FLAG FL_USER13
19448#define ROBJ_TRANSIENT_P(obj) FL_TEST_RAW((obj), ROBJECT_TRANSIENT_FLAG)
19449#define ROBJ_TRANSIENT_SET(obj) FL_SET_RAW((obj), ROBJECT_TRANSIENT_FLAG)
19450#define ROBJ_TRANSIENT_UNSET(obj) FL_UNSET_RAW((obj), ROBJECT_TRANSIENT_FLAG)
19451#define CACHELINE 64
19452#define rb_funcallv(recv,mid,argc,argv) __extension__({ static struct rb_call_data rb_funcallv_data; rb_funcallv_with_cc(&rb_funcallv_data, recv, mid, argc, argv); })
19453#define rb_method_basic_definition_p(klass,mid) __extension__({ static struct rb_call_data rb_mbdp; (klass == Qfalse) ? true : rb_method_basic_definition_p_with_cc(&rb_mbdp, klass, mid); })
19454#pragma GCC visibility push(default)
19455#undef Check_Type
19456#define Check_Type(v,t) (!RB_TYPE_P((VALUE)(v), (t)) || ((t) == RUBY_T_DATA && RTYPEDDATA_P(v)) ? rb_unexpected_type((VALUE)(v), (t)) : (void)0)
19457#define rb_typeddata_is_instance_of rb_typeddata_is_instance_of_inline
19458#define RB_OBJ_GC_FLAGS_MAX 6
19459#pragma GCC visibility pop
19460#define RUBY_DTRACE_CREATE_HOOK(name,arg) RUBY_DTRACE_HOOK(name ##_CREATE, arg)
19461#define RUBY_DTRACE_HOOK(name,arg) do { if (UNLIKELY(RUBY_DTRACE_ ##name ##_ENABLED())) { int dtrace_line; const char *dtrace_file = rb_source_location_cstr(&dtrace_line); if (!dtrace_file) dtrace_file = ""; RUBY_DTRACE_ ##name(arg, dtrace_file, dtrace_line); } } while (0)
19462#define RB_OBJ_BUILTIN_TYPE(obj) rb_obj_builtin_type(obj)
19463#define OBJ_BUILTIN_TYPE(obj) RB_OBJ_BUILTIN_TYPE(obj)
19464#define rb_obj_builtin_type(obj) __extension__({ VALUE arg_obj = (obj); RB_SPECIAL_CONST_P(arg_obj) ? -1 : RB_BUILTIN_TYPE(arg_obj); })
19465#define FLEX_ARY_LEN
19466#define BITFIELD(type,name,size) type name : size
19467#define COMPILER_WARNING_PUSH _Pragma("GCC diagnostic push")
19468#define COMPILER_WARNING_POP _Pragma("GCC diagnostic pop")
19469#define COMPILER_WARNING_SPECIFIER(kind,msg) GCC diagnostic kind #msg
19470#define COMPILER_WARNING_ERROR(flag) COMPILER_WARNING_PRAGMA(COMPILER_WARNING_SPECIFIER(error, flag))
19471#define COMPILER_WARNING_IGNORED(flag) COMPILER_WARNING_PRAGMA(COMPILER_WARNING_SPECIFIER(ignored, flag))
19472#define COMPILER_WARNING_PRAGMA(str) COMPILER_WARNING_PRAGMA_(str)
19473#define COMPILER_WARNING_PRAGMA_(str) _Pragma(#str)
19474#define UNALIGNED_MEMBER_ACCESS(expr) __extension__({ COMPILER_WARNING_PUSH; COMPILER_WARNING_IGNORED(-Waddress-of-packed-member); typeof(expr) unaligned_member_access_result = (expr); COMPILER_WARNING_POP; unaligned_member_access_result; })
19475#define UNALIGNED_MEMBER_PTR(ptr,mem) UNALIGNED_MEMBER_ACCESS(&(ptr)->mem)
19476#undef RB_OBJ_WRITE
19477#define RB_OBJ_WRITE(a,slot,b) UNALIGNED_MEMBER_ACCESS(rb_obj_write((VALUE)(a), (VALUE *)(slot), (VALUE)(b), __FILE__, __LINE__))
19478#define RUBY_VM_H 1
19479#pragma GCC visibility push(default)
19480#pragma GCC visibility pop
19481#define vm_exec rb_vm_exec
19482#define RUBY_GC_H 1
19483#define SET_MACHINE_STACK_END(p) __asm__ __volatile__ ("movq\t%%rsp, %0" : "=r" (*(p)))
19484#define RUBY_MARK_FREE_DEBUG 0
19485#define RUBY_MARK_ENTER(msg)
19486#define RUBY_MARK_LEAVE(msg)
19487#define RUBY_FREE_ENTER(msg)
19488#define RUBY_FREE_LEAVE(msg)
19489#define RUBY_GC_INFO if(0)printf
19490#define RUBY_MARK_NO_PIN_UNLESS_NULL(ptr) do { VALUE markobj = (ptr); if (RTEST(markobj)) {rb_gc_mark_movable(markobj);} } while (0)
19491#define RUBY_MARK_UNLESS_NULL(ptr) do { VALUE markobj = (ptr); if (RTEST(markobj)) {rb_gc_mark(markobj);} } while (0)
19492#define RUBY_FREE_UNLESS_NULL(ptr) if(ptr){ruby_xfree(ptr);(ptr)=NULL;}
19493#define STACK_UPPER(x,a,b) (b)
19494#define STACK_GROW_DIR_DETECTION
19495#define STACK_DIR_UPPER(a,b) STACK_UPPER(0, (a), (b))
19496#define IS_STACK_DIR_UPPER() STACK_DIR_UPPER(1,0)
19497#pragma GCC visibility push(default)
19498#pragma GCC visibility pop
19499#define RUBY_VM_CORE_H
19500#define N_OR_RUBY_DEBUG(n) (((n) > 0) ? (n) : RUBY_DEBUG)
19501#define VM_CHECK_MODE N_OR_RUBY_DEBUG(0)
19502#define VMDEBUG 0
19503#undef assert
19504#define assert RUBY_ASSERT
19505#define VM_ASSERT(expr) ((void)0)
19506#define VM_UNREACHABLE(func) UNREACHABLE
19507#define RUBY_VM_THREAD_MODEL 2
19508#define VM_INSN_INFO_TABLE_IMPL 2
19509#define RUBY_NODE_H 1
19510#define RNODE(obj) (R_CAST(RNode)(obj))
19511#define NODE_FL_NEWLINE (((VALUE)1)<<7)
19512#define NODE_TYPESHIFT 8
19513#define NODE_TYPEMASK (((VALUE)0x7f)<<NODE_TYPESHIFT)
19514#define nd_type(n) ((int) (((n)->flags & NODE_TYPEMASK)>>NODE_TYPESHIFT))
19515#define nd_set_type(n,t) (n)->flags=(((n)->flags&~NODE_TYPEMASK)|((((unsigned long)(t))<<NODE_TYPESHIFT)&NODE_TYPEMASK))
19516#define NODE_LSHIFT (NODE_TYPESHIFT+7)
19517#define NODE_LMASK (((SIGNED_VALUE)1<<(sizeof(VALUE)*CHAR_BIT-NODE_LSHIFT))-1)
19518#define nd_line(n) (int)(((SIGNED_VALUE)(n)->flags)>>NODE_LSHIFT)
19519#define nd_set_line(n,l) (n)->flags=(((n)->flags&~((VALUE)(-1)<<NODE_LSHIFT))|((VALUE)((l)&NODE_LMASK)<<NODE_LSHIFT))
19520#define nd_first_column(n) ((int)((n)->nd_loc.beg_pos.column))
19521#define nd_set_first_column(n,v) ((n)->nd_loc.beg_pos.column = (v))
19522#define nd_first_lineno(n) ((int)((n)->nd_loc.beg_pos.lineno))
19523#define nd_set_first_lineno(n,v) ((n)->nd_loc.beg_pos.lineno = (v))
19524#define nd_first_loc(n) ((n)->nd_loc.beg_pos)
19525#define nd_set_first_loc(n,v) (nd_first_loc(n) = (v))
19526#define nd_last_column(n) ((int)((n)->nd_loc.end_pos.column))
19527#define nd_set_last_column(n,v) ((n)->nd_loc.end_pos.column = (v))
19528#define nd_last_lineno(n) ((int)((n)->nd_loc.end_pos.lineno))
19529#define nd_set_last_lineno(n,v) ((n)->nd_loc.end_pos.lineno = (v))
19530#define nd_last_loc(n) ((n)->nd_loc.end_pos)
19531#define nd_set_last_loc(n,v) (nd_last_loc(n) = (v))
19532#define nd_node_id(n) ((n)->node_id)
19533#define nd_set_node_id(n,id) ((n)->node_id = (id))
19534#define nd_head u1.node
19535#define nd_alen u2.argc
19536#define nd_next u3.node
19537#define nd_cond u1.node
19538#define nd_body u2.node
19539#define nd_else u3.node
19540#define nd_resq u2.node
19541#define nd_ensr u3.node
19542#define nd_1st u1.node
19543#define nd_2nd u2.node
19544#define nd_stts u1.node
19545#define nd_entry u3.entry
19546#define nd_vid u1.id
19547#define nd_cflag u2.id
19548#define nd_cval u3.value
19549#define nd_oid u1.id
19550#define nd_tbl u1.tbl
19551#define nd_var u1.node
19552#define nd_iter u3.node
19553#define nd_value u2.node
19554#define nd_aid u3.id
19555#define nd_lit u1.value
19556#define nd_rest u1.id
19557#define nd_opt u1.node
19558#define nd_pid u1.id
19559#define nd_plen u2.argc
19560#define nd_recv u1.node
19561#define nd_mid u2.id
19562#define nd_args u3.node
19563#define nd_ainfo u3.args
19564#define nd_defn u3.node
19565#define nd_cpath u1.node
19566#define nd_super u3.node
19567#define nd_beg u1.node
19568#define nd_end u2.node
19569#define nd_state u3.state
19570#define nd_rval u2.value
19571#define nd_nth u2.argc
19572#define nd_tag u1.id
19573#define nd_alias u1.id
19574#define nd_orig u2.id
19575#define nd_undef u2.node
19576#define nd_brace u2.argc
19577#define nd_pconst u1.node
19578#define nd_pkwargs u2.node
19579#define nd_pkwrestarg u3.node
19580#define nd_apinfo u3.apinfo
19581#define NEW_NODE(t,a0,a1,a2,loc) rb_node_newnode((t),(VALUE)(a0),(VALUE)(a1),(VALUE)(a2),loc)
19582#define NEW_NODE_WITH_LOCALS(t,a1,a2,loc) node_newnode_with_locals(p, (t),(VALUE)(a1),(VALUE)(a2),loc)
19583#define NEW_DEFN(i,a,d,loc) NEW_NODE(NODE_DEFN,0,i,NEW_SCOPE(a,d,loc),loc)
19584#define NEW_DEFS(r,i,a,d,loc) NEW_NODE(NODE_DEFS,r,i,NEW_SCOPE(a,d,loc),loc)
19585#define NEW_SCOPE(a,b,loc) NEW_NODE_WITH_LOCALS(NODE_SCOPE,b,a,loc)
19586#define NEW_BLOCK(a,loc) NEW_NODE(NODE_BLOCK,a,0,0,loc)
19587#define NEW_IF(c,t,e,loc) NEW_NODE(NODE_IF,c,t,e,loc)
19588#define NEW_UNLESS(c,t,e,loc) NEW_NODE(NODE_UNLESS,c,t,e,loc)
19589#define NEW_CASE(h,b,loc) NEW_NODE(NODE_CASE,h,b,0,loc)
19590#define NEW_CASE2(b,loc) NEW_NODE(NODE_CASE2,0,b,0,loc)
19591#define NEW_CASE3(h,b,loc) NEW_NODE(NODE_CASE3,h,b,0,loc)
19592#define NEW_WHEN(c,t,e,loc) NEW_NODE(NODE_WHEN,c,t,e,loc)
19593#define NEW_IN(c,t,e,loc) NEW_NODE(NODE_IN,c,t,e,loc)
19594#define NEW_WHILE(c,b,n,loc) NEW_NODE(NODE_WHILE,c,b,n,loc)
19595#define NEW_UNTIL(c,b,n,loc) NEW_NODE(NODE_UNTIL,c,b,n,loc)
19596#define NEW_FOR(i,b,loc) NEW_NODE(NODE_FOR,0,b,i,loc)
19597#define NEW_FOR_MASGN(v,loc) NEW_NODE(NODE_FOR_MASGN,v,0,0,loc)
19598#define NEW_ITER(a,b,loc) NEW_NODE(NODE_ITER,0,NEW_SCOPE(a,b,loc),0,loc)
19599#define NEW_LAMBDA(a,b,loc) NEW_NODE(NODE_LAMBDA,0,NEW_SCOPE(a,b,loc),0,loc)
19600#define NEW_BREAK(s,loc) NEW_NODE(NODE_BREAK,s,0,0,loc)
19601#define NEW_NEXT(s,loc) NEW_NODE(NODE_NEXT,s,0,0,loc)
19602#define NEW_REDO(loc) NEW_NODE(NODE_REDO,0,0,0,loc)
19603#define NEW_RETRY(loc) NEW_NODE(NODE_RETRY,0,0,0,loc)
19604#define NEW_BEGIN(b,loc) NEW_NODE(NODE_BEGIN,0,b,0,loc)
19605#define NEW_RESCUE(b,res,e,loc) NEW_NODE(NODE_RESCUE,b,res,e,loc)
19606#define NEW_RESBODY(a,ex,n,loc) NEW_NODE(NODE_RESBODY,n,ex,a,loc)
19607#define NEW_ENSURE(b,en,loc) NEW_NODE(NODE_ENSURE,b,0,en,loc)
19608#define NEW_RETURN(s,loc) NEW_NODE(NODE_RETURN,s,0,0,loc)
19609#define NEW_YIELD(a,loc) NEW_NODE(NODE_YIELD,a,0,0,loc)
19610#define NEW_LIST(a,loc) NEW_NODE(NODE_LIST,a,1,0,loc)
19611#define NEW_ZLIST(loc) NEW_NODE(NODE_ZLIST,0,0,0,loc)
19612#define NEW_HASH(a,loc) NEW_NODE(NODE_HASH,a,0,0,loc)
19613#define NEW_MASGN(l,r,loc) NEW_NODE(NODE_MASGN,l,0,r,loc)
19614#define NEW_GASGN(v,val,loc) NEW_NODE(NODE_GASGN,v,val,rb_global_entry(v),loc)
19615#define NEW_LASGN(v,val,loc) NEW_NODE(NODE_LASGN,v,val,0,loc)
19616#define NEW_DASGN(v,val,loc) NEW_NODE(NODE_DASGN,v,val,0,loc)
19617#define NEW_DASGN_CURR(v,val,loc) NEW_NODE(NODE_DASGN_CURR,v,val,0,loc)
19618#define NEW_IASGN(v,val,loc) NEW_NODE(NODE_IASGN,v,val,0,loc)
19619#define NEW_CDECL(v,val,path,loc) NEW_NODE(NODE_CDECL,v,val,path,loc)
19620#define NEW_CVASGN(v,val,loc) NEW_NODE(NODE_CVASGN,v,val,0,loc)
19621#define NEW_OP_ASGN1(p,id,a,loc) NEW_NODE(NODE_OP_ASGN1,p,id,a,loc)
19622#define NEW_OP_ASGN2(r,t,i,o,val,loc) NEW_NODE(NODE_OP_ASGN2,r,val,NEW_OP_ASGN22(i,o,t,loc),loc)
19623#define NEW_OP_ASGN22(i,o,t,loc) NEW_NODE(NODE_OP_ASGN2,i,o,t,loc)
19624#define NEW_OP_ASGN_OR(i,val,loc) NEW_NODE(NODE_OP_ASGN_OR,i,val,0,loc)
19625#define NEW_OP_ASGN_AND(i,val,loc) NEW_NODE(NODE_OP_ASGN_AND,i,val,0,loc)
19626#define NEW_OP_CDECL(v,op,val,loc) NEW_NODE(NODE_OP_CDECL,v,val,op,loc)
19627#define NEW_GVAR(v,loc) NEW_NODE(NODE_GVAR,v,0,rb_global_entry(v),loc)
19628#define NEW_LVAR(v,loc) NEW_NODE(NODE_LVAR,v,0,0,loc)
19629#define NEW_DVAR(v,loc) NEW_NODE(NODE_DVAR,v,0,0,loc)
19630#define NEW_IVAR(v,loc) NEW_NODE(NODE_IVAR,v,0,0,loc)
19631#define NEW_CONST(v,loc) NEW_NODE(NODE_CONST,v,0,0,loc)
19632#define NEW_CVAR(v,loc) NEW_NODE(NODE_CVAR,v,0,0,loc)
19633#define NEW_NTH_REF(n,loc) NEW_NODE(NODE_NTH_REF,0,n,0,loc)
19634#define NEW_BACK_REF(n,loc) NEW_NODE(NODE_BACK_REF,0,n,0,loc)
19635#define NEW_MATCH(c,loc) NEW_NODE(NODE_MATCH,c,0,0,loc)
19636#define NEW_MATCH2(n1,n2,loc) NEW_NODE(NODE_MATCH2,n1,n2,0,loc)
19637#define NEW_MATCH3(r,n2,loc) NEW_NODE(NODE_MATCH3,r,n2,0,loc)
19638#define NEW_LIT(l,loc) NEW_NODE(NODE_LIT,l,0,0,loc)
19639#define NEW_STR(s,loc) NEW_NODE(NODE_STR,s,0,0,loc)
19640#define NEW_DSTR(s,loc) NEW_NODE(NODE_DSTR,s,1,0,loc)
19641#define NEW_XSTR(s,loc) NEW_NODE(NODE_XSTR,s,0,0,loc)
19642#define NEW_DXSTR(s,loc) NEW_NODE(NODE_DXSTR,s,0,0,loc)
19643#define NEW_DSYM(s,loc) NEW_NODE(NODE_DSYM,s,0,0,loc)
19644#define NEW_EVSTR(n,loc) NEW_NODE(NODE_EVSTR,0,(n),0,loc)
19645#define NEW_CALL(r,m,a,loc) NEW_NODE(NODE_CALL,r,m,a,loc)
19646#define NEW_OPCALL(r,m,a,loc) NEW_NODE(NODE_OPCALL,r,m,a,loc)
19647#define NEW_FCALL(m,a,loc) NEW_NODE(NODE_FCALL,0,m,a,loc)
19648#define NEW_VCALL(m,loc) NEW_NODE(NODE_VCALL,0,m,0,loc)
19649#define NEW_SUPER(a,loc) NEW_NODE(NODE_SUPER,0,0,a,loc)
19650#define NEW_ZSUPER(loc) NEW_NODE(NODE_ZSUPER,0,0,0,loc)
19651#define NEW_ARGS_AUX(r,b,loc) NEW_NODE(NODE_ARGS_AUX,r,b,0,loc)
19652#define NEW_OPT_ARG(i,v,loc) NEW_NODE(NODE_OPT_ARG,i,v,0,loc)
19653#define NEW_KW_ARG(i,v,loc) NEW_NODE(NODE_KW_ARG,i,v,0,loc)
19654#define NEW_POSTARG(i,v,loc) NEW_NODE(NODE_POSTARG,i,v,0,loc)
19655#define NEW_ARGSCAT(a,b,loc) NEW_NODE(NODE_ARGSCAT,a,b,0,loc)
19656#define NEW_ARGSPUSH(a,b,loc) NEW_NODE(NODE_ARGSPUSH,a,b,0,loc)
19657#define NEW_SPLAT(a,loc) NEW_NODE(NODE_SPLAT,a,0,0,loc)
19658#define NEW_BLOCK_PASS(b,loc) NEW_NODE(NODE_BLOCK_PASS,0,b,0,loc)
19659#define NEW_ALIAS(n,o,loc) NEW_NODE(NODE_ALIAS,n,o,0,loc)
19660#define NEW_VALIAS(n,o,loc) NEW_NODE(NODE_VALIAS,n,o,0,loc)
19661#define NEW_UNDEF(i,loc) NEW_NODE(NODE_UNDEF,0,i,0,loc)
19662#define NEW_CLASS(n,b,s,loc) NEW_NODE(NODE_CLASS,n,NEW_SCOPE(0,b,loc),(s),loc)
19663#define NEW_SCLASS(r,b,loc) NEW_NODE(NODE_SCLASS,r,NEW_SCOPE(0,b,loc),0,loc)
19664#define NEW_MODULE(n,b,loc) NEW_NODE(NODE_MODULE,n,NEW_SCOPE(0,b,loc),0,loc)
19665#define NEW_COLON2(c,i,loc) NEW_NODE(NODE_COLON2,c,i,0,loc)
19666#define NEW_COLON3(i,loc) NEW_NODE(NODE_COLON3,0,i,0,loc)
19667#define NEW_DOT2(b,e,loc) NEW_NODE(NODE_DOT2,b,e,0,loc)
19668#define NEW_DOT3(b,e,loc) NEW_NODE(NODE_DOT3,b,e,0,loc)
19669#define NEW_SELF(loc) NEW_NODE(NODE_SELF,0,0,1,loc)
19670#define NEW_NIL(loc) NEW_NODE(NODE_NIL,0,0,0,loc)
19671#define NEW_TRUE(loc) NEW_NODE(NODE_TRUE,0,0,0,loc)
19672#define NEW_FALSE(loc) NEW_NODE(NODE_FALSE,0,0,0,loc)
19673#define NEW_ERRINFO(loc) NEW_NODE(NODE_ERRINFO,0,0,0,loc)
19674#define NEW_DEFINED(e,loc) NEW_NODE(NODE_DEFINED,e,0,0,loc)
19675#define NEW_PREEXE(b,loc) NEW_SCOPE(b,loc)
19676#define NEW_POSTEXE(b,loc) NEW_NODE(NODE_POSTEXE,0,b,0,loc)
19677#define NEW_ATTRASGN(r,m,a,loc) NEW_NODE(NODE_ATTRASGN,r,m,a,loc)
19678#define NODE_SPECIAL_REQUIRED_KEYWORD ((NODE *)-1)
19679#define NODE_REQUIRED_KEYWORD_P(node) ((node)->nd_value == NODE_SPECIAL_REQUIRED_KEYWORD)
19680#define NODE_SPECIAL_NO_NAME_REST ((NODE *)-1)
19681#define NODE_NAMED_REST_P(node) ((node) != NODE_SPECIAL_NO_NAME_REST)
19682#define NODE_SPECIAL_EXCESSIVE_COMMA ((ID)1)
19683#define NODE_SPECIAL_NO_REST_KEYWORD ((NODE *)-1)
19684#pragma GCC visibility push(default)
19685#pragma GCC visibility pop
19686#define RUBY_VM_OPTS_H
19687#define OPT_TAILCALL_OPTIMIZATION 0
19688#define OPT_PEEPHOLE_OPTIMIZATION 1
19689#define OPT_SPECIALISED_INSTRUCTION 1
19690#define OPT_INLINE_CONST_CACHE 1
19691#define OPT_FROZEN_STRING_LITERAL 0
19692#define OPT_DEBUG_FROZEN_STRING_LITERAL 0
19693#define OPT_THREADED_CODE 0
19694#define OPT_DIRECT_THREADED_CODE (OPT_THREADED_CODE == 0)
19695#define OPT_TOKEN_THREADED_CODE (OPT_THREADED_CODE == 1)
19696#define OPT_CALL_THREADED_CODE (OPT_THREADED_CODE == 2)
19697#define OPT_CHECKED_RUN 1
19698#define OPT_INLINE_METHOD_CACHE 1
19699#define OPT_GLOBAL_METHOD_CACHE 1
19700#define OPT_BLOCKINLINING 0
19701#define OPT_IC_FOR_IVAR 1
19702#define OPT_OPERANDS_UNIFICATION 1
19703#define OPT_INSTRUCTIONS_UNIFICATION 0
19704#define OPT_UNIFY_ALL_COMBINATION 0
19705#define OPT_STACK_CACHING 0
19706#define OPT_SUPPORT_JOKE 0
19707#define VM_COLLECT_USAGE_DETAILS 0
19708#define RUBY_ID_H
19709#define ID_STATIC_SYM RUBY_ID_STATIC_SYM
19710#define ID_SCOPE_SHIFT RUBY_ID_SCOPE_SHIFT
19711#define ID_SCOPE_MASK RUBY_ID_SCOPE_MASK
19712#define ID_LOCAL RUBY_ID_LOCAL
19713#define ID_INSTANCE RUBY_ID_INSTANCE
19714#define ID_GLOBAL RUBY_ID_GLOBAL
19715#define ID_ATTRSET RUBY_ID_ATTRSET
19716#define ID_CONST RUBY_ID_CONST
19717#define ID_CLASS RUBY_ID_CLASS
19718#define ID_JUNK RUBY_ID_JUNK
19719#define ID_INTERNAL RUBY_ID_INTERNAL
19720#define symIFUNC ID2SYM(idIFUNC)
19721#define symCFUNC ID2SYM(idCFUNC)
19722#define RUBY_TOKEN_DOT2 128
19723#define RUBY_TOKEN_DOT3 129
19724#define RUBY_TOKEN_BDOT2 130
19725#define RUBY_TOKEN_BDOT3 131
19726#define RUBY_TOKEN_UPLUS 132
19727#define RUBY_TOKEN_UMINUS 133
19728#define RUBY_TOKEN_POW 134
19729#define RUBY_TOKEN_CMP 135
19730#define RUBY_TOKEN_LSHFT 136
19731#define RUBY_TOKEN_RSHFT 137
19732#define RUBY_TOKEN_LEQ 138
19733#define RUBY_TOKEN_GEQ 139
19734#define RUBY_TOKEN_EQ 140
19735#define RUBY_TOKEN_EQQ 141
19736#define RUBY_TOKEN_NEQ 142
19737#define RUBY_TOKEN_MATCH 143
19738#define RUBY_TOKEN_NMATCH 144
19739#define RUBY_TOKEN_AREF 145
19740#define RUBY_TOKEN_ASET 146
19741#define RUBY_TOKEN_COLON2 147
19742#define RUBY_TOKEN_ANDOP 148
19743#define RUBY_TOKEN_OROP 149
19744#define RUBY_TOKEN_ANDDOT 150
19745#define RUBY_TOKEN(t) RUBY_TOKEN_ ##t
19746#define RUBY_TOKEN2ID_TYPE(tok,type) ((tok<<RUBY_ID_SCOPE_SHIFT)|type|RUBY_ID_STATIC_SYM)
19747#define TOKEN2LOCALID(tok) RUBY_TOKEN2ID_TYPE(tok, RUBY_ID_LOCAL)
19748#define TOKEN2INSTANCEID(tok) RUBY_TOKEN2ID_TYPE(tok, RUBY_ID_INSTANCE)
19749#define TOKEN2GLOBALID(tok) RUBY_TOKEN2ID_TYPE(tok, RUBY_ID_GLOBAL)
19750#define TOKEN2CONSTID(tok) RUBY_TOKEN2ID_TYPE(tok, RUBY_ID_CONST)
19751#define TOKEN2CLASSID(tok) RUBY_TOKEN2ID_TYPE(tok, RUBY_ID_CLASS)
19752#define TOKEN2ATTRSETID(tok) RUBY_TOKEN2ID_TYPE(tok, RUBY_ID_ATTRSET)
19753#define DEFINE_LOCALID_FROM_TOKEN(n) id ##n = TOKEN2LOCALID(t ##n)
19754#define DEFINE_INSTANCEID_FROM_TOKEN(n) id ##n = TOKEN2INSTANCEID(t ##n)
19755#define DEFINE_GLOBALID_FROM_TOKEN(n) id ##n = TOKEN2GLOBALID(t ##n)
19756#define DEFINE_CONSTID_FROM_TOKEN(n) id ##n = TOKEN2CONSTID(t ##n)
19757#define DEFINE_CLASSID_FROM_TOKEN(n) id ##n = TOKEN2CLASSID(t ##n)
19758#define DEFINE_ATTRSETID_FROM_TOKEN(n) id ##n = TOKEN2ATTRSETID(t ##n)
19759#define RUBY_METHOD_H 1
19760#define END_OF_ENUMERATION(key)
19761#define METHOD_ENTRY_VISI(me) (rb_method_visibility_t)(((me)->flags & (IMEMO_FL_USER0 | IMEMO_FL_USER1)) >> (IMEMO_FL_USHIFT+0))
19762#define METHOD_ENTRY_BASIC(me) (int) (((me)->flags & (IMEMO_FL_USER2 )) >> (IMEMO_FL_USHIFT+2))
19763#define METHOD_ENTRY_COMPLEMENTED(me) ((me)->flags & IMEMO_FL_USER3)
19764#define METHOD_ENTRY_COMPLEMENTED_SET(me) ((me)->flags = (me)->flags | IMEMO_FL_USER3)
19765#define VM_METHOD_TYPE_MINIMUM_BITS 4
19766#define rb_iseq_t rb_iseq_t
19767#define UNDEFINED_METHOD_ENTRY_P(me) (!(me) || !(me)->def || (me)->def->type == VM_METHOD_TYPE_UNDEF)
19768#define UNDEFINED_REFINED_METHOD_P(def) ((def)->type == VM_METHOD_TYPE_REFINED && UNDEFINED_METHOD_ENTRY_P((def)->body.refined.orig_me))
19769#pragma GCC visibility push(default)
19770#pragma GCC visibility pop
19771#define RUBY_ATOMIC_H
19772#define ATOMIC_SET(var,val) (void)__atomic_exchange_n(&(var), (val), __ATOMIC_SEQ_CST)
19773#define ATOMIC_INC(var) __atomic_fetch_add(&(var), 1, __ATOMIC_SEQ_CST)
19774#define ATOMIC_DEC(var) __atomic_fetch_sub(&(var), 1, __ATOMIC_SEQ_CST)
19775#define ATOMIC_OR(var,val) __atomic_fetch_or(&(var), (val), __ATOMIC_SEQ_CST)
19776#define ATOMIC_EXCHANGE(var,val) __atomic_exchange_n(&(var), (val), __ATOMIC_SEQ_CST)
19777#define ATOMIC_CAS(var,oldval,newval) RB_GNUC_EXTENSION_BLOCK( __typeof__(var) oldvaldup = (oldval); __atomic_compare_exchange_n(&(var), &oldvaldup, (newval), 0, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST); oldvaldup )
19778#define ATOMIC_SIZE_ADD(var,val) __atomic_fetch_add(&(var), (val), __ATOMIC_SEQ_CST)
19779#define ATOMIC_SIZE_SUB(var,val) __atomic_fetch_sub(&(var), (val), __ATOMIC_SEQ_CST)
19780#define RUBY_ATOMIC_GENERIC_MACRO 1
19781#define ATOMIC_SIZE_INC(var) ATOMIC_INC(var)
19782#define ATOMIC_SIZE_DEC(var) ATOMIC_DEC(var)
19783#define ATOMIC_SIZE_EXCHANGE(var,val) ATOMIC_EXCHANGE(var, val)
19784#define ATOMIC_SIZE_CAS(var,oldval,val) ATOMIC_CAS(var, oldval, val)
19785#define ATOMIC_PTR_EXCHANGE(var,val) ATOMIC_EXCHANGE(var, val)
19786#define ATOMIC_PTR_CAS(var,oldval,newval) ATOMIC_CAS(var, oldval, newval)
19787#define ATOMIC_VALUE_EXCHANGE(var,val) ATOMIC_EXCHANGE(var, val)
19788#define ATOMIC_VALUE_CAS(var,oldval,val) ATOMIC_CAS(var, oldval, val)
19789#define CCAN_LIST_H
19790#define _ASSERT_H 1
19791#define __ASSERT_VOID_CAST (void)
19792#define assert(expr) ((void) sizeof ((expr) ? 1 : 0), __extension__ ({ if (expr) ; else __assert_fail (#expr, __FILE__, __LINE__, __ASSERT_FUNCTION); }))
19793#define assert_perror(errnum) (!(errnum) ? __ASSERT_VOID_CAST (0) : __assert_perror_fail ((errnum), __FILE__, __LINE__, __ASSERT_FUNCTION))
19794#define __ASSERT_FUNCTION __extension__ __PRETTY_FUNCTION__
19795#undef static_assert
19796#define static_assert _Static_assert
19797#define CCAN_STR_H
19798#define stringify(expr) stringify_1(expr)
19799#define stringify_1(expr) #expr
19800#define CCAN_CONTAINER_OF_H
19801#define CCAN_CHECK_TYPE_H
19802#define check_type(expr,type) ((typeof(expr) *)0 != (type *)0)
19803#define check_types_match(expr1,expr2) ((typeof(expr1) *)0 != (typeof(expr2) *)0)
19804#define container_of(member_ptr,containing_type,member) ((containing_type *) ((char *)(member_ptr) - container_off(containing_type, member)) + check_types_match(*(member_ptr), ((containing_type *)0)->member))
19805#define container_of_or_null(member_ptr,containing_type,member) ((containing_type *) container_of_or_null_(member_ptr, container_off(containing_type, member)) + check_types_match(*(member_ptr), ((containing_type *)0)->member))
19806#define container_off(containing_type,member) offsetof(containing_type, member)
19807#define container_of_var(member_ptr,container_var,member) container_of(member_ptr, typeof(*container_var), member)
19808#define container_off_var(var,member) container_off(typeof(*var), member)
19809#define LIST_LOC __FILE__ ":" stringify(__LINE__)
19810#define list_debug(h,loc) ((void)loc, h)
19811#define list_debug_node(n,loc) ((void)loc, n)
19812#define LIST_HEAD_INIT(name) { { &(name).n, &(name).n } }
19813#define LIST_HEAD(name) struct list_head name = LIST_HEAD_INIT(name)
19814#define list_add_after(h,p,n) list_add_after_(h, p, n, LIST_LOC)
19815#define list_add(h,n) list_add_(h, n, LIST_LOC)
19816#define list_add_before(h,p,n) list_add_before_(h, p, n, LIST_LOC)
19817#define list_add_tail(h,n) list_add_tail_(h, n, LIST_LOC)
19818#define list_empty(h) list_empty_(h, LIST_LOC)
19819#define list_empty_nodebug(h) list_empty(h)
19820#define list_del(n) list_del_(n, LIST_LOC)
19821#define list_del_init(n) list_del_init_(n, LIST_LOC)
19822#define list_swap(o,n) list_swap_(o, n, LIST_LOC)
19823#define list_entry(n,type,member) container_of(n, type, member)
19824#define list_top(h,type,member) ((type *)list_top_((h), list_off_(type, member)))
19825#define list_pop(h,type,member) ((type *)list_pop_((h), list_off_(type, member)))
19826#define list_tail(h,type,member) ((type *)list_tail_((h), list_off_(type, member)))
19827#define list_for_each(h,i,member) list_for_each_off(h, i, list_off_var_(i, member))
19828#define list_for_each_rev(h,i,member) list_for_each_rev_off(h, i, list_off_var_(i, member))
19829#define list_for_each_rev_safe(h,i,nxt,member) list_for_each_rev_safe_off(h, i, nxt, list_off_var_(i, member))
19830#define list_for_each_safe(h,i,nxt,member) list_for_each_safe_off(h, i, nxt, list_off_var_(i, member))
19831#define list_next(h,i,member) ((list_typeof(i))list_entry_or_null(list_debug(h, __FILE__ ":" stringify(__LINE__)), (i)->member.next, list_off_var_((i), member)))
19832#define list_prev(h,i,member) ((list_typeof(i))list_entry_or_null(list_debug(h, __FILE__ ":" stringify(__LINE__)), (i)->member.prev, list_off_var_((i), member)))
19833#define list_append_list(t,f) list_append_list_(t, f, __FILE__ ":" stringify(__LINE__))
19834#define list_prepend_list(t,f) list_prepend_list_(t, f, LIST_LOC)
19835#define list_for_each_off_dir_(h,i,off,dir) for (i = list_node_to_off_(list_debug(h, LIST_LOC)->n.dir, (off)); list_node_from_off_((void *)i, (off)) != &(h)->n; i = list_node_to_off_(list_node_from_off_((void *)i, (off))->dir, (off)))
19836#define list_for_each_safe_off_dir_(h,i,nxt,off,dir) for (i = list_node_to_off_(list_debug(h, LIST_LOC)->n.dir, (off)), nxt = list_node_to_off_(list_node_from_off_(i, (off))->dir, (off)); list_node_from_off_(i, (off)) != &(h)->n; i = nxt, nxt = list_node_to_off_(list_node_from_off_(i, (off))->dir, (off)))
19837#define list_for_each_off(h,i,off) list_for_each_off_dir_((h),(i),(off),next)
19838#define list_for_each_rev_off(h,i,off) list_for_each_off_dir_((h),(i),(off),prev)
19839#define list_for_each_safe_off(h,i,nxt,off) list_for_each_safe_off_dir_((h),(i),(nxt),(off),next)
19840#define list_for_each_rev_safe_off(h,i,nxt,off) list_for_each_safe_off_dir_((h),(i),(nxt),(off),prev)
19841#define list_entry_off(n,type,off) ((type *)list_node_from_off_((n), (off)))
19842#define list_head_off(h,type,off) ((type *)list_head_off((h), (off)))
19843#define list_tail_off(h,type,off) ((type *)list_tail_((h), (off)))
19844#define list_add_off(h,n,off) list_add((h), list_node_from_off_((n), (off)))
19845#define list_del_off(n,off) list_del(list_node_from_off_((n), (off)))
19846#define list_del_from_off(h,n,off) list_del_from(h, list_node_from_off_((n), (off)))
19847#define list_off_(type,member) (container_off(type, member) + check_type(((type *)0)->member, struct list_node))
19848#define list_off_var_(var,member) (container_off_var(var, member) + check_type(var->member, struct list_node))
19849#define list_typeof(var) typeof(var)
19850#define RUBY_THREAD_NATIVE_H 1
19851#define _PTHREAD_H 1
19852#define _SCHED_H 1
19853#define __need_size_t
19854#define __need_NULL
19855#undef __need_ptrdiff_t
19856#undef __need_size_t
19857#undef __need_wchar_t
19858#undef NULL
19859#define NULL ((void *)0)
19860#undef __need_NULL
19861#define offsetof(TYPE,MEMBER) __builtin_offsetof (TYPE, MEMBER)
19862#define _BITS_SCHED_H 1
19863#define SCHED_OTHER 0
19864#define SCHED_FIFO 1
19865#define SCHED_RR 2
19866#define SCHED_BATCH 3
19867#define SCHED_ISO 4
19868#define SCHED_IDLE 5
19869#define SCHED_DEADLINE 6
19870#define SCHED_RESET_ON_FORK 0x40000000
19871#define CSIGNAL 0x000000ff
19872#define CLONE_VM 0x00000100
19873#define CLONE_FS 0x00000200
19874#define CLONE_FILES 0x00000400
19875#define CLONE_SIGHAND 0x00000800
19876#define CLONE_PTRACE 0x00002000
19877#define CLONE_VFORK 0x00004000
19878#define CLONE_PARENT 0x00008000
19879#define CLONE_THREAD 0x00010000
19880#define CLONE_NEWNS 0x00020000
19881#define CLONE_SYSVSEM 0x00040000
19882#define CLONE_SETTLS 0x00080000
19883#define CLONE_PARENT_SETTID 0x00100000
19884#define CLONE_CHILD_CLEARTID 0x00200000
19885#define CLONE_DETACHED 0x00400000
19886#define CLONE_UNTRACED 0x00800000
19887#define CLONE_CHILD_SETTID 0x01000000
19888#define CLONE_NEWCGROUP 0x02000000
19889#define CLONE_NEWUTS 0x04000000
19890#define CLONE_NEWIPC 0x08000000
19891#define CLONE_NEWUSER 0x10000000
19892#define CLONE_NEWPID 0x20000000
19893#define CLONE_NEWNET 0x40000000
19894#define CLONE_IO 0x80000000
19895#define _BITS_TYPES_STRUCT_SCHED_PARAM 1
19896#define _BITS_CPU_SET_H 1
19897#define __CPU_SETSIZE 1024
19898#define __NCPUBITS (8 * sizeof (__cpu_mask))
19899#define __CPUELT(cpu) ((cpu) / __NCPUBITS)
19900#define __CPUMASK(cpu) ((__cpu_mask) 1 << ((cpu) % __NCPUBITS))
19901#define __CPU_ZERO_S(setsize,cpusetp) do __builtin_memset (cpusetp, '\0', setsize); while (0)
19902#define __CPU_SET_S(cpu,setsize,cpusetp) (__extension__ ({ size_t __cpu = (cpu); __cpu / 8 < (setsize) ? (((__cpu_mask *) ((cpusetp)->__bits))[__CPUELT (__cpu)] |= __CPUMASK (__cpu)) : 0; }))
19903#define __CPU_CLR_S(cpu,setsize,cpusetp) (__extension__ ({ size_t __cpu = (cpu); __cpu / 8 < (setsize) ? (((__cpu_mask *) ((cpusetp)->__bits))[__CPUELT (__cpu)] &= ~__CPUMASK (__cpu)) : 0; }))
19904#define __CPU_ISSET_S(cpu,setsize,cpusetp) (__extension__ ({ size_t __cpu = (cpu); __cpu / 8 < (setsize) ? ((((const __cpu_mask *) ((cpusetp)->__bits))[__CPUELT (__cpu)] & __CPUMASK (__cpu))) != 0 : 0; }))
19905#define __CPU_COUNT_S(setsize,cpusetp) __sched_cpucount (setsize, cpusetp)
19906#define __CPU_EQUAL_S(setsize,cpusetp1,cpusetp2) (__builtin_memcmp (cpusetp1, cpusetp2, setsize) == 0)
19907#define __CPU_OP_S(setsize,destset,srcset1,srcset2,op) (__extension__ ({ cpu_set_t *__dest = (destset); const __cpu_mask *__arr1 = (srcset1)->__bits; const __cpu_mask *__arr2 = (srcset2)->__bits; size_t __imax = (setsize) / sizeof (__cpu_mask); size_t __i; for (__i = 0; __i < __imax; ++__i) ((__cpu_mask *) __dest->__bits)[__i] = __arr1[__i] op __arr2[__i]; __dest; }))
19908#define __CPU_ALLOC_SIZE(count) ((((count) + __NCPUBITS - 1) / __NCPUBITS) * sizeof (__cpu_mask))
19909#define __CPU_ALLOC(count) __sched_cpualloc (count)
19910#define __CPU_FREE(cpuset) __sched_cpufree (cpuset)
19911#define sched_priority sched_priority
19912#define __sched_priority sched_priority
19913#define CPU_SETSIZE __CPU_SETSIZE
19914#define CPU_SET(cpu,cpusetp) __CPU_SET_S (cpu, sizeof (cpu_set_t), cpusetp)
19915#define CPU_CLR(cpu,cpusetp) __CPU_CLR_S (cpu, sizeof (cpu_set_t), cpusetp)
19916#define CPU_ISSET(cpu,cpusetp) __CPU_ISSET_S (cpu, sizeof (cpu_set_t), cpusetp)
19917#define CPU_ZERO(cpusetp) __CPU_ZERO_S (sizeof (cpu_set_t), cpusetp)
19918#define CPU_COUNT(cpusetp) __CPU_COUNT_S (sizeof (cpu_set_t), cpusetp)
19919#define CPU_SET_S(cpu,setsize,cpusetp) __CPU_SET_S (cpu, setsize, cpusetp)
19920#define CPU_CLR_S(cpu,setsize,cpusetp) __CPU_CLR_S (cpu, setsize, cpusetp)
19921#define CPU_ISSET_S(cpu,setsize,cpusetp) __CPU_ISSET_S (cpu, setsize, cpusetp)
19922#define CPU_ZERO_S(setsize,cpusetp) __CPU_ZERO_S (setsize, cpusetp)
19923#define CPU_COUNT_S(setsize,cpusetp) __CPU_COUNT_S (setsize, cpusetp)
19924#define CPU_EQUAL(cpusetp1,cpusetp2) __CPU_EQUAL_S (sizeof (cpu_set_t), cpusetp1, cpusetp2)
19925#define CPU_EQUAL_S(setsize,cpusetp1,cpusetp2) __CPU_EQUAL_S (setsize, cpusetp1, cpusetp2)
19926#define CPU_AND(destset,srcset1,srcset2) __CPU_OP_S (sizeof (cpu_set_t), destset, srcset1, srcset2, &)
19927#define CPU_OR(destset,srcset1,srcset2) __CPU_OP_S (sizeof (cpu_set_t), destset, srcset1, srcset2, |)
19928#define CPU_XOR(destset,srcset1,srcset2) __CPU_OP_S (sizeof (cpu_set_t), destset, srcset1, srcset2, ^)
19929#define CPU_AND_S(setsize,destset,srcset1,srcset2) __CPU_OP_S (setsize, destset, srcset1, srcset2, &)
19930#define CPU_OR_S(setsize,destset,srcset1,srcset2) __CPU_OP_S (setsize, destset, srcset1, srcset2, |)
19931#define CPU_XOR_S(setsize,destset,srcset1,srcset2) __CPU_OP_S (setsize, destset, srcset1, srcset2, ^)
19932#define CPU_ALLOC_SIZE(count) __CPU_ALLOC_SIZE (count)
19933#define CPU_ALLOC(count) __CPU_ALLOC (count)
19934#define CPU_FREE(cpuset) __CPU_FREE (cpuset)
19935#define _TIME_H 1
19936#define __need_size_t
19937#define __need_NULL
19938#undef __need_ptrdiff_t
19939#undef __need_size_t
19940#undef __need_wchar_t
19941#undef NULL
19942#define NULL ((void *)0)
19943#undef __need_NULL
19944#define offsetof(TYPE,MEMBER) __builtin_offsetof (TYPE, MEMBER)
19945#define _BITS_TIME_H 1
19946#define CLOCKS_PER_SEC ((__clock_t) 1000000)
19947#define CLOCK_REALTIME 0
19948#define CLOCK_MONOTONIC 1
19949#define CLOCK_PROCESS_CPUTIME_ID 2
19950#define CLOCK_THREAD_CPUTIME_ID 3
19951#define CLOCK_MONOTONIC_RAW 4
19952#define CLOCK_REALTIME_COARSE 5
19953#define CLOCK_MONOTONIC_COARSE 6
19954#define CLOCK_BOOTTIME 7
19955#define CLOCK_REALTIME_ALARM 8
19956#define CLOCK_BOOTTIME_ALARM 9
19957#define CLOCK_TAI 11
19958#define TIMER_ABSTIME 1
19959#define _BITS_TIMEX_H 1
19960#define ADJ_OFFSET 0x0001
19961#define ADJ_FREQUENCY 0x0002
19962#define ADJ_MAXERROR 0x0004
19963#define ADJ_ESTERROR 0x0008
19964#define ADJ_STATUS 0x0010
19965#define ADJ_TIMECONST 0x0020
19966#define ADJ_TAI 0x0080
19967#define ADJ_SETOFFSET 0x0100
19968#define ADJ_MICRO 0x1000
19969#define ADJ_NANO 0x2000
19970#define ADJ_TICK 0x4000
19971#define ADJ_OFFSET_SINGLESHOT 0x8001
19972#define ADJ_OFFSET_SS_READ 0xa001
19973#define MOD_OFFSET ADJ_OFFSET
19974#define MOD_FREQUENCY ADJ_FREQUENCY
19975#define MOD_MAXERROR ADJ_MAXERROR
19976#define MOD_ESTERROR ADJ_ESTERROR
19977#define MOD_STATUS ADJ_STATUS
19978#define MOD_TIMECONST ADJ_TIMECONST
19979#define MOD_CLKB ADJ_TICK
19980#define MOD_CLKA ADJ_OFFSET_SINGLESHOT
19981#define MOD_TAI ADJ_TAI
19982#define MOD_MICRO ADJ_MICRO
19983#define MOD_NANO ADJ_NANO
19984#define STA_PLL 0x0001
19985#define STA_PPSFREQ 0x0002
19986#define STA_PPSTIME 0x0004
19987#define STA_FLL 0x0008
19988#define STA_INS 0x0010
19989#define STA_DEL 0x0020
19990#define STA_UNSYNC 0x0040
19991#define STA_FREQHOLD 0x0080
19992#define STA_PPSSIGNAL 0x0100
19993#define STA_PPSJITTER 0x0200
19994#define STA_PPSWANDER 0x0400
19995#define STA_PPSERROR 0x0800
19996#define STA_CLOCKERR 0x1000
19997#define STA_NANO 0x2000
19998#define STA_MODE 0x4000
19999#define STA_CLK 0x8000
20000#define STA_RONLY (STA_PPSSIGNAL | STA_PPSJITTER | STA_PPSWANDER | STA_PPSERROR | STA_CLOCKERR | STA_NANO | STA_MODE | STA_CLK)
20001#define __struct_tm_defined 1
20002#define __itimerspec_defined 1
20003#define TIME_UTC 1
20004#define __isleap(year) ((year) % 4 == 0 && ((year) % 100 != 0 || (year) % 400 == 0))
20005#define _BITS_SETJMP_H 1
20006#define __WORDSIZE 64
20007#define __WORDSIZE_TIME64_COMPAT32 1
20008#define __SYSCALL_WORDSIZE 64
20009#define __WORDSIZE 64
20010#define __WORDSIZE_TIME64_COMPAT32 1
20011#define __SYSCALL_WORDSIZE 64
20012#define PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_JOINABLE
20013#define PTHREAD_CREATE_DETACHED PTHREAD_CREATE_DETACHED
20014#define PTHREAD_MUTEX_INITIALIZER { { 0, 0, 0, 0, 0, __PTHREAD_SPINS, { 0, 0 } } }
20015#define PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP { { 0, 0, 0, 0, PTHREAD_MUTEX_RECURSIVE_NP, __PTHREAD_SPINS, { 0, 0 } } }
20016#define PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP { { 0, 0, 0, 0, PTHREAD_MUTEX_ERRORCHECK_NP, __PTHREAD_SPINS, { 0, 0 } } }
20017#define PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP { { 0, 0, 0, 0, PTHREAD_MUTEX_ADAPTIVE_NP, __PTHREAD_SPINS, { 0, 0 } } }
20018#define PTHREAD_RWLOCK_INITIALIZER { { 0, 0, 0, 0, 0, 0, 0, 0, __PTHREAD_RWLOCK_ELISION_EXTRA, 0, 0 } }
20019#define PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP { { 0, 0, 0, 0, 0, 0, 0, 0, __PTHREAD_RWLOCK_ELISION_EXTRA, 0, PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP } }
20020#define PTHREAD_INHERIT_SCHED PTHREAD_INHERIT_SCHED
20021#define PTHREAD_EXPLICIT_SCHED PTHREAD_EXPLICIT_SCHED
20022#define PTHREAD_SCOPE_SYSTEM PTHREAD_SCOPE_SYSTEM
20023#define PTHREAD_SCOPE_PROCESS PTHREAD_SCOPE_PROCESS
20024#define PTHREAD_PROCESS_PRIVATE PTHREAD_PROCESS_PRIVATE
20025#define PTHREAD_PROCESS_SHARED PTHREAD_PROCESS_SHARED
20026#define PTHREAD_COND_INITIALIZER { { {0}, {0}, {0, 0}, {0, 0}, 0, 0, {0, 0} } }
20027#define PTHREAD_CANCEL_ENABLE PTHREAD_CANCEL_ENABLE
20028#define PTHREAD_CANCEL_DISABLE PTHREAD_CANCEL_DISABLE
20029#define PTHREAD_CANCEL_DEFERRED PTHREAD_CANCEL_DEFERRED
20030#define PTHREAD_CANCEL_ASYNCHRONOUS PTHREAD_CANCEL_ASYNCHRONOUS
20031#define PTHREAD_CANCELED ((void *) -1)
20032#define PTHREAD_ONCE_INIT 0
20033#define PTHREAD_BARRIER_SERIAL_THREAD -1
20034#define __cleanup_fct_attribute
20035#define pthread_cleanup_push(routine,arg) do { __pthread_unwind_buf_t __cancel_buf; void (*__cancel_routine) (void *) = (routine); void *__cancel_arg = (arg); int __not_first_call = __sigsetjmp ((struct __jmp_buf_tag *) (void *) __cancel_buf.__cancel_jmp_buf, 0); if (__glibc_unlikely (__not_first_call)) { __cancel_routine (__cancel_arg); __pthread_unwind_next (&__cancel_buf); } __pthread_register_cancel (&__cancel_buf); do {
20036#define pthread_cleanup_pop(execute) do { } while (0); } while (0); __pthread_unregister_cancel (&__cancel_buf); if (execute) __cancel_routine (__cancel_arg); } while (0)
20037#define pthread_cleanup_push_defer_np(routine,arg) do { __pthread_unwind_buf_t __cancel_buf; void (*__cancel_routine) (void *) = (routine); void *__cancel_arg = (arg); int __not_first_call = __sigsetjmp ((struct __jmp_buf_tag *) (void *) __cancel_buf.__cancel_jmp_buf, 0); if (__glibc_unlikely (__not_first_call)) { __cancel_routine (__cancel_arg); __pthread_unwind_next (&__cancel_buf); } __pthread_register_cancel_defer (&__cancel_buf); do {
20038#define pthread_cleanup_pop_restore_np(execute) do { } while (0); } while (0); __pthread_unregister_cancel_restore (&__cancel_buf); if (execute) __cancel_routine (__cancel_arg); } while (0)
20039#pragma GCC visibility push(default)
20040#pragma GCC visibility pop
20041#define RUBY_THREAD_PTHREAD_H
20042#define RB_NATIVETHREAD_LOCK_INIT PTHREAD_MUTEX_INITIALIZER
20043#define RB_NATIVETHREAD_COND_INIT PTHREAD_COND_INITIALIZER
20044#undef except
20045#undef try
20046#undef leave
20047#undef finally
20048#define _SETJMP_H 1
20049#define setjmp(env) _setjmp (env)
20050#define sigsetjmp(env,savemask) __sigsetjmp (env, savemask)
20051#define _SIGNAL_H
20052#define _BITS_SIGNUM_H 1
20053#define _BITS_SIGNUM_GENERIC_H 1
20054#define SIG_ERR ((__sighandler_t) -1)
20055#define SIG_DFL ((__sighandler_t) 0)
20056#define SIG_IGN ((__sighandler_t) 1)
20057#define SIG_HOLD ((__sighandler_t) 2)
20058#define SIGINT 2
20059#define SIGILL 4
20060#define SIGABRT 6
20061#define SIGFPE 8
20062#define SIGSEGV 11
20063#define SIGTERM 15
20064#define SIGHUP 1
20065#define SIGQUIT 3
20066#define SIGTRAP 5
20067#define SIGKILL 9
20068#define SIGBUS 10
20069#define SIGSYS 12
20070#define SIGPIPE 13
20071#define SIGALRM 14
20072#define SIGURG 16
20073#define SIGSTOP 17
20074#define SIGTSTP 18
20075#define SIGCONT 19
20076#define SIGCHLD 20
20077#define SIGTTIN 21
20078#define SIGTTOU 22
20079#define SIGPOLL 23
20080#define SIGXCPU 24
20081#define SIGXFSZ 25
20082#define SIGVTALRM 26
20083#define SIGPROF 27
20084#define SIGUSR1 30
20085#define SIGUSR2 31
20086#define SIGWINCH 28
20087#define SIGIO SIGPOLL
20088#define SIGIOT SIGABRT
20089#define SIGCLD SIGCHLD
20090#define __SIGRTMIN 32
20091#define __SIGRTMAX __SIGRTMIN
20092#define _NSIG (__SIGRTMAX + 1)
20093#define SIGSTKFLT 16
20094#define SIGPWR 30
20095#undef SIGBUS
20096#define SIGBUS 7
20097#undef SIGUSR1
20098#define SIGUSR1 10
20099#undef SIGUSR2
20100#define SIGUSR2 12
20101#undef SIGCHLD
20102#define SIGCHLD 17
20103#undef SIGCONT
20104#define SIGCONT 18
20105#undef SIGSTOP
20106#define SIGSTOP 19
20107#undef SIGTSTP
20108#define SIGTSTP 20
20109#undef SIGURG
20110#define SIGURG 23
20111#undef SIGPOLL
20112#define SIGPOLL 29
20113#undef SIGSYS
20114#define SIGSYS 31
20115#undef __SIGRTMAX
20116#define __SIGRTMAX 64
20117#define __sig_atomic_t_defined 1
20118#define __siginfo_t_defined 1
20119#define __WORDSIZE 64
20120#define __WORDSIZE_TIME64_COMPAT32 1
20121#define __SYSCALL_WORDSIZE 64
20122#define ____sigval_t_defined
20123#define __SI_MAX_SIZE 128
20124#define __SI_PAD_SIZE ((__SI_MAX_SIZE / sizeof (int)) - 4)
20125#define _BITS_SIGINFO_ARCH_H 1
20126#define __SI_ALIGNMENT
20127#define __SI_BAND_TYPE long int
20128#define __SI_CLOCK_T __clock_t
20129#define __SI_ERRNO_THEN_CODE 1
20130#define __SI_HAVE_SIGSYS 1
20131#define __SI_SIGFAULT_ADDL
20132#define si_pid _sifields._kill.si_pid
20133#define si_uid _sifields._kill.si_uid
20134#define si_timerid _sifields._timer.si_tid
20135#define si_overrun _sifields._timer.si_overrun
20136#define si_status _sifields._sigchld.si_status
20137#define si_utime _sifields._sigchld.si_utime
20138#define si_stime _sifields._sigchld.si_stime
20139#define si_value _sifields._rt.si_sigval
20140#define si_int _sifields._rt.si_sigval.sival_int
20141#define si_ptr _sifields._rt.si_sigval.sival_ptr
20142#define si_addr _sifields._sigfault.si_addr
20143#define si_addr_lsb _sifields._sigfault.si_addr_lsb
20144#define si_lower _sifields._sigfault._bounds._addr_bnd._lower
20145#define si_upper _sifields._sigfault._bounds._addr_bnd._upper
20146#define si_pkey _sifields._sigfault._bounds._pkey
20147#define si_band _sifields._sigpoll.si_band
20148#define si_fd _sifields._sigpoll.si_fd
20149#define si_call_addr _sifields._sigsys._call_addr
20150#define si_syscall _sifields._sigsys._syscall
20151#define si_arch _sifields._sigsys._arch
20152#define _BITS_SIGINFO_CONSTS_H 1
20153#define __SI_ASYNCIO_AFTER_SIGIO 1
20154#define SI_ASYNCNL SI_ASYNCNL
20155#define SI_DETHREAD SI_DETHREAD
20156#define SI_TKILL SI_TKILL
20157#define SI_SIGIO SI_SIGIO
20158#define SI_ASYNCIO SI_ASYNCIO
20159#define SI_MESGQ SI_MESGQ
20160#define SI_TIMER SI_TIMER
20161#define SI_ASYNCIO SI_ASYNCIO
20162#define SI_QUEUE SI_QUEUE
20163#define SI_USER SI_USER
20164#define SI_KERNEL SI_KERNEL
20165#define ILL_ILLOPC ILL_ILLOPC
20166#define ILL_ILLOPN ILL_ILLOPN
20167#define ILL_ILLADR ILL_ILLADR
20168#define ILL_ILLTRP ILL_ILLTRP
20169#define ILL_PRVOPC ILL_PRVOPC
20170#define ILL_PRVREG ILL_PRVREG
20171#define ILL_COPROC ILL_COPROC
20172#define ILL_BADSTK ILL_BADSTK
20173#define ILL_BADIADDR ILL_BADIADDR
20174#define FPE_INTDIV FPE_INTDIV
20175#define FPE_INTOVF FPE_INTOVF
20176#define FPE_FLTDIV FPE_FLTDIV
20177#define FPE_FLTOVF FPE_FLTOVF
20178#define FPE_FLTUND FPE_FLTUND
20179#define FPE_FLTRES FPE_FLTRES
20180#define FPE_FLTINV FPE_FLTINV
20181#define FPE_FLTSUB FPE_FLTSUB
20182#define FPE_FLTUNK FPE_FLTUNK
20183#define FPE_CONDTRAP FPE_CONDTRAP
20184#define SEGV_MAPERR SEGV_MAPERR
20185#define SEGV_ACCERR SEGV_ACCERR
20186#define SEGV_BNDERR SEGV_BNDERR
20187#define SEGV_PKUERR SEGV_PKUERR
20188#define SEGV_ACCADI SEGV_ACCADI
20189#define SEGV_ADIDERR SEGV_ADIDERR
20190#define SEGV_ADIPERR SEGV_ADIPERR
20191#define BUS_ADRALN BUS_ADRALN
20192#define BUS_ADRERR BUS_ADRERR
20193#define BUS_OBJERR BUS_OBJERR
20194#define BUS_MCEERR_AR BUS_MCEERR_AR
20195#define BUS_MCEERR_AO BUS_MCEERR_AO
20196#define TRAP_BRKPT TRAP_BRKPT
20197#define TRAP_TRACE TRAP_TRACE
20198#define TRAP_BRANCH TRAP_BRANCH
20199#define TRAP_HWBKPT TRAP_HWBKPT
20200#define TRAP_UNK TRAP_UNK
20201#define CLD_EXITED CLD_EXITED
20202#define CLD_KILLED CLD_KILLED
20203#define CLD_DUMPED CLD_DUMPED
20204#define CLD_TRAPPED CLD_TRAPPED
20205#define CLD_STOPPED CLD_STOPPED
20206#define CLD_CONTINUED CLD_CONTINUED
20207#define POLL_IN POLL_IN
20208#define POLL_OUT POLL_OUT
20209#define POLL_MSG POLL_MSG
20210#define POLL_ERR POLL_ERR
20211#define POLL_PRI POLL_PRI
20212#define POLL_HUP POLL_HUP
20213#define _BITS_SIGINFO_CONSTS_ARCH_H 1
20214#define __sigval_t_defined
20215#define __sigevent_t_defined 1
20216#define __WORDSIZE 64
20217#define __WORDSIZE_TIME64_COMPAT32 1
20218#define __SYSCALL_WORDSIZE 64
20219#define __SIGEV_MAX_SIZE 64
20220#define __SIGEV_PAD_SIZE ((__SIGEV_MAX_SIZE / sizeof (int)) - 4)
20221#define sigev_notify_function _sigev_un._sigev_thread._function
20222#define sigev_notify_attributes _sigev_un._sigev_thread._attribute
20223#define _BITS_SIGEVENT_CONSTS_H 1
20224#define SIGEV_SIGNAL SIGEV_SIGNAL
20225#define SIGEV_NONE SIGEV_NONE
20226#define SIGEV_THREAD SIGEV_THREAD
20227#define SIGEV_THREAD_ID SIGEV_THREAD_ID
20228#define sigmask(sig) ((int)(1u << ((sig) - 1)))
20229#define NSIG _NSIG
20230#define _BITS_SIGACTION_H 1
20231#define sa_handler __sigaction_handler.sa_handler
20232#define sa_sigaction __sigaction_handler.sa_sigaction
20233#define SA_NOCLDSTOP 1
20234#define SA_NOCLDWAIT 2
20235#define SA_SIGINFO 4
20236#define SA_ONSTACK 0x08000000
20237#define SA_RESTART 0x10000000
20238#define SA_NODEFER 0x40000000
20239#define SA_RESETHAND 0x80000000
20240#define SA_INTERRUPT 0x20000000
20241#define SA_NOMASK SA_NODEFER
20242#define SA_ONESHOT SA_RESETHAND
20243#define SA_STACK SA_ONSTACK
20244#define SIG_BLOCK 0
20245#define SIG_UNBLOCK 1
20246#define SIG_SETMASK 2
20247#define _BITS_SIGCONTEXT_H 1
20248#define FP_XSTATE_MAGIC1 0x46505853U
20249#define FP_XSTATE_MAGIC2 0x46505845U
20250#define FP_XSTATE_MAGIC2_SIZE sizeof (FP_XSTATE_MAGIC2)
20251#define __need_size_t
20252#undef __need_ptrdiff_t
20253#undef __need_size_t
20254#undef __need_wchar_t
20255#undef NULL
20256#define NULL ((void *)0)
20257#undef __need_NULL
20258#define offsetof(TYPE,MEMBER) __builtin_offsetof (TYPE, MEMBER)
20259#define __stack_t_defined 1
20260#define __need_size_t
20261#undef __need_ptrdiff_t
20262#undef __need_size_t
20263#undef __need_wchar_t
20264#undef NULL
20265#define NULL ((void *)0)
20266#undef __need_NULL
20267#define offsetof(TYPE,MEMBER) __builtin_offsetof (TYPE, MEMBER)
20268#define _SYS_UCONTEXT_H 1
20269#define __ctx(fld) fld
20270#define __NGREG 23
20271#define NGREG __NGREG
20272#define REG_R8 REG_R8
20273#define REG_R9 REG_R9
20274#define REG_R10 REG_R10
20275#define REG_R11 REG_R11
20276#define REG_R12 REG_R12
20277#define REG_R13 REG_R13
20278#define REG_R14 REG_R14
20279#define REG_R15 REG_R15
20280#define REG_RDI REG_RDI
20281#define REG_RSI REG_RSI
20282#define REG_RBP REG_RBP
20283#define REG_RBX REG_RBX
20284#define REG_RDX REG_RDX
20285#define REG_RAX REG_RAX
20286#define REG_RCX REG_RCX
20287#define REG_RSP REG_RSP
20288#define REG_RIP REG_RIP
20289#define REG_EFL REG_EFL
20290#define REG_CSGSFS REG_CSGSFS
20291#define REG_ERR REG_ERR
20292#define REG_TRAPNO REG_TRAPNO
20293#define REG_OLDMASK REG_OLDMASK
20294#define REG_CR2 REG_CR2
20295#undef __ctx
20296#define _BITS_SIGSTACK_H 1
20297#define MINSIGSTKSZ 2048
20298#define SIGSTKSZ 8192
20299#define _BITS_SS_FLAGS_H 1
20300#define SS_ONSTACK SS_ONSTACK
20301#define SS_DISABLE SS_DISABLE
20302#define __sigstack_defined 1
20303#define _BITS_SIGTHREAD_H 1
20304#define SIGRTMIN (__libc_current_sigrtmin ())
20305#define SIGRTMAX (__libc_current_sigrtmax ())
20306#define RUBY_NSIG NSIG
20307#define RUBY_SIGCHLD (SIGCLD)
20308#define SIGCHLD_LOSSY (0)
20309#define WAITPID_USE_SIGCHLD (RUBY_SIGCHLD || SIGCHLD_LOSSY)
20310#define va_init_list(a,b) va_start((a),(b))
20311#define USE_SIGALTSTACK
20312#define RB_ALTSTACK_INIT(var) var = rb_register_sigaltstack()
20313#define RB_ALTSTACK_FREE(var) xfree(var)
20314#define RB_ALTSTACK(var) var
20315#define TAG_NONE RUBY_TAG_NONE
20316#define TAG_RETURN RUBY_TAG_RETURN
20317#define TAG_BREAK RUBY_TAG_BREAK
20318#define TAG_NEXT RUBY_TAG_NEXT
20319#define TAG_RETRY RUBY_TAG_RETRY
20320#define TAG_REDO RUBY_TAG_REDO
20321#define TAG_RAISE RUBY_TAG_RAISE
20322#define TAG_THROW RUBY_TAG_THROW
20323#define TAG_FATAL RUBY_TAG_FATAL
20324#define TAG_MASK RUBY_TAG_MASK
20325#define CoreDataFromValue(obj,type) (type*)DATA_PTR(obj)
20326#define GetCoreDataFromValue(obj,type,ptr) ((ptr) = CoreDataFromValue((obj), type))
20327#define PATHOBJ_PATH 0
20328#define PATHOBJ_REALPATH 1
20329#define USE_LAZY_LOAD 0
20330#define GetVMPtr(obj,ptr) GetCoreDataFromValue((obj), rb_vm_t, (ptr))
20331#define RUBY_VM_SIZE_ALIGN 4096
20332#define RUBY_VM_THREAD_VM_STACK_SIZE ( 128 * 1024 * sizeof(VALUE))
20333#define RUBY_VM_THREAD_VM_STACK_SIZE_MIN ( 2 * 1024 * sizeof(VALUE))
20334#define RUBY_VM_THREAD_MACHINE_STACK_SIZE ( 128 * 1024 * sizeof(VALUE))
20335#define RUBY_VM_THREAD_MACHINE_STACK_SIZE_MIN ( 16 * 1024 * sizeof(VALUE))
20336#define RUBY_VM_FIBER_VM_STACK_SIZE ( 16 * 1024 * sizeof(VALUE))
20337#define RUBY_VM_FIBER_VM_STACK_SIZE_MIN ( 2 * 1024 * sizeof(VALUE))
20338#define RUBY_VM_FIBER_MACHINE_STACK_SIZE ( 64 * 1024 * sizeof(VALUE))
20339#define RUBY_VM_FIBER_MACHINE_STACK_SIZE_MIN ( 16 * 1024 * sizeof(VALUE))
20340#define INTEGER_REDEFINED_OP_FLAG (1 << 0)
20341#define FLOAT_REDEFINED_OP_FLAG (1 << 1)
20342#define STRING_REDEFINED_OP_FLAG (1 << 2)
20343#define ARRAY_REDEFINED_OP_FLAG (1 << 3)
20344#define HASH_REDEFINED_OP_FLAG (1 << 4)
20345#define SYMBOL_REDEFINED_OP_FLAG (1 << 6)
20346#define TIME_REDEFINED_OP_FLAG (1 << 7)
20347#define REGEXP_REDEFINED_OP_FLAG (1 << 8)
20348#define NIL_REDEFINED_OP_FLAG (1 << 9)
20349#define TRUE_REDEFINED_OP_FLAG (1 << 10)
20350#define FALSE_REDEFINED_OP_FLAG (1 << 11)
20351#define PROC_REDEFINED_OP_FLAG (1 << 12)
20352#define BASIC_OP_UNREDEFINED_P(op,klass) (LIKELY((GET_VM()->redefined_flag[(op)]&(klass)) == 0))
20353#define VM_DEBUG_BP_CHECK 0
20354#define VM_DEBUG_VERIFY_METHOD_CACHE (VMDEBUG != 0)
20355#define VM_CORE_H_EC_DEFINED 1
20356#define VM_DEFINECLASS_TYPE(x) ((rb_vm_defineclass_type_t)(x) & VM_DEFINECLASS_TYPE_MASK)
20357#define VM_DEFINECLASS_FLAG_SCOPED 0x08
20358#define VM_DEFINECLASS_FLAG_HAS_SUPERCLASS 0x10
20359#define VM_DEFINECLASS_SCOPED_P(x) ((x) & VM_DEFINECLASS_FLAG_SCOPED)
20360#define VM_DEFINECLASS_HAS_SUPERCLASS_P(x) ((x) & VM_DEFINECLASS_FLAG_HAS_SUPERCLASS)
20361#pragma GCC visibility push(default)
20362#pragma GCC visibility pop
20363#define GetProcPtr(obj,ptr) GetCoreDataFromValue((obj), rb_proc_t, (ptr))
20364#define GetBindingPtr(obj,ptr) GetCoreDataFromValue((obj), rb_binding_t, (ptr))
20365#define VM_CHECKMATCH_TYPE_MASK 0x03
20366#define VM_CHECKMATCH_ARRAY 0x04
20367#define VM_CALL_ARGS_SPLAT (0x01 << VM_CALL_ARGS_SPLAT_bit)
20368#define VM_CALL_ARGS_BLOCKARG (0x01 << VM_CALL_ARGS_BLOCKARG_bit)
20369#define VM_CALL_FCALL (0x01 << VM_CALL_FCALL_bit)
20370#define VM_CALL_VCALL (0x01 << VM_CALL_VCALL_bit)
20371#define VM_CALL_ARGS_SIMPLE (0x01 << VM_CALL_ARGS_SIMPLE_bit)
20372#define VM_CALL_BLOCKISEQ (0x01 << VM_CALL_BLOCKISEQ_bit)
20373#define VM_CALL_KWARG (0x01 << VM_CALL_KWARG_bit)
20374#define VM_CALL_KW_SPLAT (0x01 << VM_CALL_KW_SPLAT_bit)
20375#define VM_CALL_TAILCALL (0x01 << VM_CALL_TAILCALL_bit)
20376#define VM_CALL_SUPER (0x01 << VM_CALL_SUPER_bit)
20377#define VM_CALL_ZSUPER (0x01 << VM_CALL_ZSUPER_bit)
20378#define VM_CALL_OPT_SEND (0x01 << VM_CALL_OPT_SEND_bit)
20379#define FUNC_FASTCALL(x) x
20380#define VM_TAGGED_PTR_SET(p,tag) ((VALUE)(p) | (tag))
20381#define VM_TAGGED_PTR_REF(v,mask) ((void *)((v) & ~mask))
20382#define GC_GUARDED_PTR(p) VM_TAGGED_PTR_SET((p), 0x01)
20383#define GC_GUARDED_PTR_REF(p) VM_TAGGED_PTR_REF((p), 0x03)
20384#define GC_GUARDED_PTR_P(p) (((VALUE)(p)) & 0x01)
20385#define VM_ENV_DATA_SIZE ( 3)
20386#define VM_ENV_DATA_INDEX_ME_CREF (-2)
20387#define VM_ENV_DATA_INDEX_SPECVAL (-1)
20388#define VM_ENV_DATA_INDEX_FLAGS ( 0)
20389#define VM_ENV_DATA_INDEX_ENV ( 1)
20390#define VM_ENV_INDEX_LAST_LVAR (-VM_ENV_DATA_SIZE)
20391#define RUBYVM_CFUNC_FRAME_P(cfp) (VM_FRAME_TYPE(cfp) == VM_FRAME_MAGIC_CFUNC)
20392#define VM_GUARDED_PREV_EP(ep) GC_GUARDED_PTR(ep)
20393#define VM_BLOCK_HANDLER_NONE 0
20394#define RUBY_VM_PREVIOUS_CONTROL_FRAME(cfp) ((cfp)+1)
20395#define RUBY_VM_NEXT_CONTROL_FRAME(cfp) ((cfp)-1)
20396#define RUBY_VM_VALID_CONTROL_FRAME_P(cfp,ecfp) ((void *)(ecfp) > (void *)(cfp))
20397#define SDR() rb_vmdebug_stack_dump_raw(GET_EC(), GET_EC()->cfp)
20398#define SDR2(cfp) rb_vmdebug_stack_dump_raw(GET_EC(), (cfp))
20399#pragma GCC visibility push(default)
20400#pragma GCC visibility pop
20401#define rb_vm_register_special_exception(sp,e,m) rb_vm_register_special_exception_str(sp, e, rb_usascii_str_new_static((m), (long)rb_strlen_lit(m)))
20402#define sysstack_error GET_VM()->special_exceptions[ruby_error_sysstack]
20403#define RUBY_CONST_ASSERT(expr) (1/!!(expr))
20404#define VM_STACK_OVERFLOWED_P(cfp,sp,margin) (!RUBY_CONST_ASSERT(sizeof(*(sp)) == sizeof(VALUE)) || !RUBY_CONST_ASSERT(sizeof(*(cfp)) == sizeof(rb_control_frame_t)) || ((rb_control_frame_t *)((sp) + (margin)) + 1) >= (cfp))
20405#define WHEN_VM_STACK_OVERFLOWED(cfp,sp,margin) if (LIKELY(!VM_STACK_OVERFLOWED_P(cfp, sp, margin))) {(void)0;} else
20406#define CHECK_VM_STACK_OVERFLOW0(cfp,sp,margin) WHEN_VM_STACK_OVERFLOWED(cfp, sp, margin) vm_stackoverflow()
20407#define CHECK_VM_STACK_OVERFLOW(cfp,margin) WHEN_VM_STACK_OVERFLOWED(cfp, (cfp)->sp, margin) vm_stackoverflow()
20408#pragma GCC visibility push(default)
20409#pragma GCC visibility pop
20410#define GET_VM() rb_current_vm()
20411#define GET_THREAD() rb_current_thread()
20412#define GET_EC() rb_current_execution_context()
20413#define RUBY_VM_SET_TIMER_INTERRUPT(ec) ATOMIC_OR((ec)->interrupt_flag, TIMER_INTERRUPT_MASK)
20414#define RUBY_VM_SET_INTERRUPT(ec) ATOMIC_OR((ec)->interrupt_flag, PENDING_INTERRUPT_MASK)
20415#define RUBY_VM_SET_POSTPONED_JOB_INTERRUPT(ec) ATOMIC_OR((ec)->interrupt_flag, POSTPONED_JOB_INTERRUPT_MASK)
20416#define RUBY_VM_SET_TRAP_INTERRUPT(ec) ATOMIC_OR((ec)->interrupt_flag, TRAP_INTERRUPT_MASK)
20417#define RUBY_VM_INTERRUPTED(ec) ((ec)->interrupt_flag & ~(ec)->interrupt_mask & (PENDING_INTERRUPT_MASK|TRAP_INTERRUPT_MASK))
20418#define RUBY_VM_INTERRUPTED_ANY(ec) ((ec)->interrupt_flag & ~(ec)->interrupt_mask)
20419#define RUBY_VM_CHECK_INTS(ec) rb_vm_check_ints(ec)
20420#define EXEC_EVENT_HOOK_ORIG(ec_,hooks_,flag_,self_,id_,called_id_,klass_,data_,pop_p_) do { const rb_event_flag_t flag_arg_ = (flag_); rb_hook_list_t *hooks_arg_ = (hooks_); if (UNLIKELY((hooks_arg_)->events & (flag_arg_))) { rb_exec_event_hook_orig(ec_, hooks_arg_, flag_arg_, self_, id_, called_id_, klass_, data_, pop_p_); } } while (0)
20421#define EXEC_EVENT_HOOK(ec_,flag_,self_,id_,called_id_,klass_,data_) EXEC_EVENT_HOOK_ORIG(ec_, rb_vm_global_hooks(ec_), flag_, self_, id_, called_id_, klass_, data_, 0)
20422#define EXEC_EVENT_HOOK_AND_POP_FRAME(ec_,flag_,self_,id_,called_id_,klass_,data_) EXEC_EVENT_HOOK_ORIG(ec_, rb_vm_global_hooks(ec_), flag_, self_, id_, called_id_, klass_, data_, 1)
20423#pragma GCC visibility push(default)
20424#define RUBY_EVENT_COVERAGE_LINE 0x010000
20425#define RUBY_EVENT_COVERAGE_BRANCH 0x020000
20426#pragma GCC visibility pop
20427#define RUBY_DEBUG_H
20428#pragma GCC visibility push(default)
20429#define dpv(h,v) ruby_debug_print_value(-1, 0, (h), (v))
20430#define dp(v) ruby_debug_print_value(-1, 0, "", (v))
20431#define dpi(i) ruby_debug_print_id(-1, 0, "", (i))
20432#define dpn(n) ruby_debug_print_node(-1, 0, "", (n))
20433#pragma GCC visibility pop
20434#define RUBY_ISEQ_H 1
20435#define ISEQ_MAJOR_VERSION ((unsigned int)ruby_api_version[0])
20436#define ISEQ_MINOR_VERSION ((unsigned int)ruby_api_version[1])
20437#define ISEQ_COVERAGE(iseq) iseq->body->variable.coverage
20438#define ISEQ_COVERAGE_SET(iseq,cov) RB_OBJ_WRITE(iseq, &iseq->body->variable.coverage, cov)
20439#define ISEQ_LINE_COVERAGE(iseq) RARRAY_AREF(ISEQ_COVERAGE(iseq), COVERAGE_INDEX_LINES)
20440#define ISEQ_BRANCH_COVERAGE(iseq) RARRAY_AREF(ISEQ_COVERAGE(iseq), COVERAGE_INDEX_BRANCHES)
20441#define ISEQ_PC2BRANCHINDEX(iseq) iseq->body->variable.pc2branchindex
20442#define ISEQ_PC2BRANCHINDEX_SET(iseq,h) RB_OBJ_WRITE(iseq, &iseq->body->variable.pc2branchindex, h)
20443#define ISEQ_FLIP_CNT(iseq) (iseq)->body->variable.flip_count
20444#define ISEQ_TRACE_EVENTS (RUBY_EVENT_LINE | RUBY_EVENT_CLASS | RUBY_EVENT_END | RUBY_EVENT_CALL | RUBY_EVENT_RETURN| RUBY_EVENT_B_CALL| RUBY_EVENT_B_RETURN| RUBY_EVENT_COVERAGE_LINE| RUBY_EVENT_COVERAGE_BRANCH)
20445#define ISEQ_NOT_LOADED_YET IMEMO_FL_USER1
20446#define ISEQ_USE_COMPILE_DATA IMEMO_FL_USER2
20447#define ISEQ_TRANSLATED IMEMO_FL_USER3
20448#define ISEQ_MARKABLE_ISEQ IMEMO_FL_USER4
20449#define ISEQ_EXECUTABLE_P(iseq) (FL_TEST_RAW((iseq), ISEQ_NOT_LOADED_YET | ISEQ_USE_COMPILE_DATA) == 0)
20450#pragma GCC visibility push(default)
20451#define INITIAL_ISEQ_COMPILE_DATA_STORAGE_BUFF_SIZE (512)
20452#pragma GCC visibility pop
20453#define RUBY_EVAL_INTERN_H
20454#define PASS_PASSED_BLOCK_HANDLER_EC(ec) pass_passed_block_handler(ec)
20455#define PASS_PASSED_BLOCK_HANDLER() pass_passed_block_handler(GET_EC())
20456#define ruby_setjmp(env) RUBY_SETJMP(env)
20457#define ruby_longjmp(env,val) RUBY_LONGJMP((env),(val))
20458#define _ERRNO_H 1
20459#define _BITS_ERRNO_H 1
20460#define _ASM_GENERIC_ERRNO_H
20461#define _ASM_GENERIC_ERRNO_BASE_H
20462#define EPERM 1
20463#define ENOENT 2
20464#define ESRCH 3
20465#define EINTR 4
20466#define EIO 5
20467#define ENXIO 6
20468#define E2BIG 7
20469#define ENOEXEC 8
20470#define EBADF 9
20471#define ECHILD 10
20472#define EAGAIN 11
20473#define ENOMEM 12
20474#define EACCES 13
20475#define EFAULT 14
20476#define ENOTBLK 15
20477#define EBUSY 16
20478#define EEXIST 17
20479#define EXDEV 18
20480#define ENODEV 19
20481#define ENOTDIR 20
20482#define EISDIR 21
20483#define EINVAL 22
20484#define ENFILE 23
20485#define EMFILE 24
20486#define ENOTTY 25
20487#define ETXTBSY 26
20488#define EFBIG 27
20489#define ENOSPC 28
20490#define ESPIPE 29
20491#define EROFS 30
20492#define EMLINK 31
20493#define EPIPE 32
20494#define EDOM 33
20495#define ERANGE 34
20496#define EDEADLK 35
20497#define ENAMETOOLONG 36
20498#define ENOLCK 37
20499#define ENOSYS 38
20500#define ENOTEMPTY 39
20501#define ELOOP 40
20502#define EWOULDBLOCK EAGAIN
20503#define ENOMSG 42
20504#define EIDRM 43
20505#define ECHRNG 44
20506#define EL2NSYNC 45
20507#define EL3HLT 46
20508#define EL3RST 47
20509#define ELNRNG 48
20510#define EUNATCH 49
20511#define ENOCSI 50
20512#define EL2HLT 51
20513#define EBADE 52
20514#define EBADR 53
20515#define EXFULL 54
20516#define ENOANO 55
20517#define EBADRQC 56
20518#define EBADSLT 57
20519#define EDEADLOCK EDEADLK
20520#define EBFONT 59
20521#define ENOSTR 60
20522#define ENODATA 61
20523#define ETIME 62
20524#define ENOSR 63
20525#define ENONET 64
20526#define ENOPKG 65
20527#define EREMOTE 66
20528#define ENOLINK 67
20529#define EADV 68
20530#define ESRMNT 69
20531#define ECOMM 70
20532#define EPROTO 71
20533#define EMULTIHOP 72
20534#define EDOTDOT 73
20535#define EBADMSG 74
20536#define EOVERFLOW 75
20537#define ENOTUNIQ 76
20538#define EBADFD 77
20539#define EREMCHG 78
20540#define ELIBACC 79
20541#define ELIBBAD 80
20542#define ELIBSCN 81
20543#define ELIBMAX 82
20544#define ELIBEXEC 83
20545#define EILSEQ 84
20546#define ERESTART 85
20547#define ESTRPIPE 86
20548#define EUSERS 87
20549#define ENOTSOCK 88
20550#define EDESTADDRREQ 89
20551#define EMSGSIZE 90
20552#define EPROTOTYPE 91
20553#define ENOPROTOOPT 92
20554#define EPROTONOSUPPORT 93
20555#define ESOCKTNOSUPPORT 94
20556#define EOPNOTSUPP 95
20557#define EPFNOSUPPORT 96
20558#define EAFNOSUPPORT 97
20559#define EADDRINUSE 98
20560#define EADDRNOTAVAIL 99
20561#define ENETDOWN 100
20562#define ENETUNREACH 101
20563#define ENETRESET 102
20564#define ECONNABORTED 103
20565#define ECONNRESET 104
20566#define ENOBUFS 105
20567#define EISCONN 106
20568#define ENOTCONN 107
20569#define ESHUTDOWN 108
20570#define ETOOMANYREFS 109
20571#define ETIMEDOUT 110
20572#define ECONNREFUSED 111
20573#define EHOSTDOWN 112
20574#define EHOSTUNREACH 113
20575#define EALREADY 114
20576#define EINPROGRESS 115
20577#define ESTALE 116
20578#define EUCLEAN 117
20579#define ENOTNAM 118
20580#define ENAVAIL 119
20581#define EISNAM 120
20582#define EREMOTEIO 121
20583#define EDQUOT 122
20584#define ENOMEDIUM 123
20585#define EMEDIUMTYPE 124
20586#define ECANCELED 125
20587#define ENOKEY 126
20588#define EKEYEXPIRED 127
20589#define EKEYREVOKED 128
20590#define EKEYREJECTED 129
20591#define EOWNERDEAD 130
20592#define ENOTRECOVERABLE 131
20593#define ERFKILL 132
20594#define EHWPOISON 133
20595#define ENOTSUP EOPNOTSUPP
20596#define errno (*__errno_location ())
20597#define __error_t_defined 1
20598#define _SYS_PARAM_H 1
20599#define __need_NULL
20600#undef __need_ptrdiff_t
20601#undef __need_size_t
20602#undef __need_wchar_t
20603#undef NULL
20604#define NULL ((void *)0)
20605#undef __need_NULL
20606#define offsetof(TYPE,MEMBER) __builtin_offsetof (TYPE, MEMBER)
20607#define __undef_ARG_MAX
20608#define _LINUX_PARAM_H
20609#define __ASM_GENERIC_PARAM_H
20610#define HZ 100
20611#define EXEC_PAGESIZE 4096
20612#define NOGROUP (-1)
20613#define MAXHOSTNAMELEN 64
20614#undef ARG_MAX
20615#undef __undef_ARG_MAX
20616#define MAXSYMLINKS 20
20617#define NOFILE 256
20618#define NCARGS 131072
20619#define NBBY CHAR_BIT
20620#define NGROUPS NGROUPS_MAX
20621#define CANBSIZ MAX_CANON
20622#define MAXPATHLEN PATH_MAX
20623#define NODEV ((dev_t) -1)
20624#define DEV_BSIZE 512
20625#define setbit(a,i) ((a)[(i)/NBBY] |= 1<<((i)%NBBY))
20626#define clrbit(a,i) ((a)[(i)/NBBY] &= ~(1<<((i)%NBBY)))
20627#define isset(a,i) ((a)[(i)/NBBY] & (1<<((i)%NBBY)))
20628#define isclr(a,i) (((a)[(i)/NBBY] & (1<<((i)%NBBY))) == 0)
20629#define howmany(x,y) (((x) + ((y) - 1)) / (y))
20630#define roundup(x,y) (__builtin_constant_p (y) && powerof2 (y) ? (((x) + (y) - 1) & ~((y) - 1)) : ((((x) + ((y) - 1)) / (y)) * (y)))
20631#define powerof2(x) ((((x) - 1) & (x)) == 0)
20632#define MIN(a,b) (((a)<(b))?(a):(b))
20633#define MAX(a,b) (((a)>(b))?(a):(b))
20634#define SAVE_ROOT_JMPBUF_BEFORE_STMT
20635#define SAVE_ROOT_JMPBUF_AFTER_STMT
20636#define SAVE_ROOT_JMPBUF(th,stmt) do if (ruby_setjmp((th)->root_jmpbuf) == 0) { SAVE_ROOT_JMPBUF_BEFORE_STMT stmt; SAVE_ROOT_JMPBUF_AFTER_STMT } else { rb_fiber_start(); } while (0)
20637#define EC_PUSH_TAG(ec) do { rb_execution_context_t * const _ec = (ec); struct rb_vm_tag _tag; _tag.state = TAG_NONE; _tag.tag = Qundef; _tag.prev = _ec->tag;
20638#define EC_POP_TAG() _ec->tag = _tag.prev; } while (0)
20639#define EC_TMPPOP_TAG() _ec->tag = _tag.prev
20640#define EC_REPUSH_TAG() (void)(_ec->tag = &_tag)
20641#define VAR_FROM_MEMORY(var) (var)
20642#define VAR_INITIALIZED(var) ((void)&(var))
20643#define VAR_NOCLOBBERED(var) var
20644#define EC_EXEC_TAG() (ruby_setjmp(_tag.buf) ? rb_ec_tag_state(VAR_FROM_MEMORY(_ec)) : (EC_REPUSH_TAG(), 0))
20645#define EC_JUMP_TAG(ec,st) rb_ec_tag_jump(ec, st)
20646#define INTERNAL_EXCEPTION_P(exc) FIXNUM_P(exc)
20647#define CREF_FL_PUSHED_BY_EVAL IMEMO_FL_USER1
20648#define CREF_FL_OMOD_SHARED IMEMO_FL_USER2
20649#pragma GCC diagnostic push
20650#pragma GCC diagnostic ignored "-Waddress-of-packed-member"
20651#pragma GCC diagnostic pop
20652#define rb_ec_raised_set(ec,f) ((ec)->raised_flag |= (f))
20653#define rb_ec_raised_reset(ec,f) ((ec)->raised_flag &= ~(f))
20654#define rb_ec_raised_p(ec,f) (((ec)->raised_flag & (f)) != 0)
20655#define rb_ec_raised_clear(ec) ((ec)->raised_flag = 0)
20656#define CharNext(p) ((p) + mblen((p), RUBY_MBCHAR_MAXSIZE))
20657#define BUILTIN_H_INCLUDED
20658#define RB_BUILTIN_FUNCTION(_i,_name,_fname,_arity) { .name = #_name, .func_ptr = (void *)_fname, .argc = _arity, .index = _i }
20659#define _PROBES_H
20660#define DTRACE_PROBES_DISABLED 1
20661#define RUBY_DTRACE_METHOD_ENTRY_ENABLED() 0
20662#define RUBY_DTRACE_METHOD_ENTRY(classname,methodname,filename,lineno) do {} while (0)
20663#define RUBY_DTRACE_METHOD_RETURN_ENABLED() 0
20664#define RUBY_DTRACE_METHOD_RETURN(classname,methodname,filename,lineno) do {} while (0)
20665#define RUBY_DTRACE_CMETHOD_ENTRY_ENABLED() 0
20666#define RUBY_DTRACE_CMETHOD_ENTRY(classname,methodname,filename,lineno) do {} while (0)
20667#define RUBY_DTRACE_CMETHOD_RETURN_ENABLED() 0
20668#define RUBY_DTRACE_CMETHOD_RETURN(classname,methodname,filename,lineno) do {} while (0)
20669#define RUBY_DTRACE_REQUIRE_ENTRY_ENABLED() 0
20670#define RUBY_DTRACE_REQUIRE_ENTRY(rquiredfile,filename,lineno) do {} while (0)
20671#define RUBY_DTRACE_REQUIRE_RETURN_ENABLED() 0
20672#define RUBY_DTRACE_REQUIRE_RETURN(requiredfile,filename,lineno) do {} while (0)
20673#define RUBY_DTRACE_FIND_REQUIRE_ENTRY_ENABLED() 0
20674#define RUBY_DTRACE_FIND_REQUIRE_ENTRY(requiredfile,filename,lineno) do {} while (0)
20675#define RUBY_DTRACE_FIND_REQUIRE_RETURN_ENABLED() 0
20676#define RUBY_DTRACE_FIND_REQUIRE_RETURN(requiredfile,filename,lineno) do {} while (0)
20677#define RUBY_DTRACE_LOAD_ENTRY_ENABLED() 0
20678#define RUBY_DTRACE_LOAD_ENTRY(loadedfile,filename,lineno) do {} while (0)
20679#define RUBY_DTRACE_LOAD_RETURN_ENABLED() 0
20680#define RUBY_DTRACE_LOAD_RETURN(loadedfile,filename,lineno) do {} while (0)
20681#define RUBY_DTRACE_RAISE_ENABLED() 0
20682#define RUBY_DTRACE_RAISE(classname,filename,lineno) do {} while (0)
20683#define RUBY_DTRACE_OBJECT_CREATE_ENABLED() 0
20684#define RUBY_DTRACE_OBJECT_CREATE(classname,filename,lineno) do {} while (0)
20685#define RUBY_DTRACE_ARRAY_CREATE_ENABLED() 0
20686#define RUBY_DTRACE_ARRAY_CREATE(length,filename,lineno) do {} while (0)
20687#define RUBY_DTRACE_HASH_CREATE_ENABLED() 0
20688#define RUBY_DTRACE_HASH_CREATE(length,filename,lineno) do {} while (0)
20689#define RUBY_DTRACE_STRING_CREATE_ENABLED() 0
20690#define RUBY_DTRACE_STRING_CREATE(length,filename,lineno) do {} while (0)
20691#define RUBY_DTRACE_SYMBOL_CREATE_ENABLED() 0
20692#define RUBY_DTRACE_SYMBOL_CREATE(str,filename,lineno) do {} while (0)
20693#define RUBY_DTRACE_PARSE_BEGIN_ENABLED() 0
20694#define RUBY_DTRACE_PARSE_BEGIN(sourcefile,lineno) do {} while (0)
20695#define RUBY_DTRACE_PARSE_END_ENABLED() 0
20696#define RUBY_DTRACE_PARSE_END(sourcefile,lineno) do {} while (0)
20697#define RUBY_DTRACE_INSN_ENABLED() 0
20698#define RUBY_DTRACE_INSN(insns_name) do {} while (0)
20699#define RUBY_DTRACE_INSN_OPERAND_ENABLED() 0
20700#define RUBY_DTRACE_INSN_OPERAND(val,insns_name) do {} while (0)
20701#define RUBY_DTRACE_GC_MARK_BEGIN_ENABLED() 0
20702#define RUBY_DTRACE_GC_MARK_BEGIN() do {} while (0)
20703#define RUBY_DTRACE_GC_MARK_END_ENABLED() 0
20704#define RUBY_DTRACE_GC_MARK_END() do {} while (0)
20705#define RUBY_DTRACE_GC_SWEEP_BEGIN_ENABLED() 0
20706#define RUBY_DTRACE_GC_SWEEP_BEGIN() do {} while (0)
20707#define RUBY_DTRACE_GC_SWEEP_END_ENABLED() 0
20708#define RUBY_DTRACE_GC_SWEEP_END() do {} while (0)
20709#define RUBY_DTRACE_METHOD_CACHE_CLEAR_ENABLED() 0
20710#define RUBY_DTRACE_METHOD_CACHE_CLEAR(class,filename,lineno) do {} while (0)
20711#define RUBY_PROBES_HELPER_H
20712#define RUBY_DTRACE_METHOD_HOOK(name,ec,klazz,id) do { if (UNLIKELY(RUBY_DTRACE_ ##name ##_ENABLED())) { struct ruby_dtrace_method_hook_args args; if (rb_dtrace_setup(ec, klazz, id, &args)) { RUBY_DTRACE_ ##name(args.classname, args.methodname, args.filename, args.line_no); } } } while (0)
20713#define RUBY_DTRACE_METHOD_ENTRY_HOOK(ec,klass,id) RUBY_DTRACE_METHOD_HOOK(METHOD_ENTRY, ec, klass, id)
20714#define RUBY_DTRACE_METHOD_RETURN_HOOK(ec,klass,id) RUBY_DTRACE_METHOD_HOOK(METHOD_RETURN, ec, klass, id)
20715#define RUBY_DTRACE_CMETHOD_ENTRY_HOOK(ec,klass,id) RUBY_DTRACE_METHOD_HOOK(CMETHOD_ENTRY, ec, klass, id)
20716#define RUBY_DTRACE_CMETHOD_RETURN_HOOK(ec,klass,id) RUBY_DTRACE_METHOD_HOOK(CMETHOD_RETURN, ec, klass, id)
20717#pragma GCC diagnostic push
20718#pragma GCC diagnostic ignored "-Waddress-of-packed-member"
20719#pragma GCC diagnostic pop
20720#define RUBY_MJIT_H 1
20721#define USE_DEBUG_COUNTER 0
20722#define RUBY_DEBUG_COUNTER_H 1
20723#define RB_DEBUG_COUNTER(name) RB_DEBUG_COUNTER_ ##name,
20724#undef RB_DEBUG_COUNTER
20725#define RB_DEBUG_COUNTER_INC(type) ((void)0)
20726#define RB_DEBUG_COUNTER_INC_UNLESS(type,cond) (cond)
20727#define RB_DEBUG_COUNTER_INC_IF(type,cond) (cond)
20728#pragma GCC visibility push(default)
20729#pragma GCC visibility pop
20730#pragma GCC visibility push(default)
20731#pragma GCC visibility pop
20732#define JIT_ISEQ_SIZE_THRESHOLD 1000
20733#define RUBY_INSNHELPER_H
20734#pragma GCC visibility push(default)
20735#pragma GCC visibility pop
20736#define COLLECT_USAGE_INSN(insn)
20737#define COLLECT_USAGE_OPERAND(insn,n,op)
20738#define COLLECT_USAGE_REGISTER(reg,s)
20739#define PUSH(x) (SET_SV(x), INC_SP(1))
20740#define TOPN(n) (*(GET_SP()-(n)-1))
20741#define POPN(n) (DEC_SP(n))
20742#define POP() (DEC_SP(1))
20743#define STACK_ADDR_FROM_TOP(n) (GET_SP()-(n))
20744#define VM_REG_CFP (reg_cfp)
20745#define VM_REG_PC (VM_REG_CFP->pc)
20746#define VM_REG_SP (VM_REG_CFP->sp)
20747#define VM_REG_EP (VM_REG_CFP->ep)
20748#define RESTORE_REGS() do { VM_REG_CFP = ec->cfp; } while (0)
20749#define COLLECT_USAGE_REGISTER_HELPER(a,b,v) (v)
20750#define GET_PC() (COLLECT_USAGE_REGISTER_HELPER(PC, GET, VM_REG_PC))
20751#define SET_PC(x) (VM_REG_PC = (COLLECT_USAGE_REGISTER_HELPER(PC, SET, (x))))
20752#define GET_CURRENT_INSN() (*GET_PC())
20753#define GET_OPERAND(n) (GET_PC()[(n)])
20754#define ADD_PC(n) (SET_PC(VM_REG_PC + (n)))
20755#define JUMP(dst) (SET_PC(VM_REG_PC + (dst)))
20756#define GET_CFP() (COLLECT_USAGE_REGISTER_HELPER(CFP, GET, VM_REG_CFP))
20757#define GET_EP() (COLLECT_USAGE_REGISTER_HELPER(EP, GET, VM_REG_EP))
20758#define SET_EP(x) (VM_REG_EP = (COLLECT_USAGE_REGISTER_HELPER(EP, SET, (x))))
20759#define GET_LEP() (VM_EP_LEP(GET_EP()))
20760#define GET_SP() (COLLECT_USAGE_REGISTER_HELPER(SP, GET, VM_REG_SP))
20761#define SET_SP(x) (VM_REG_SP = (COLLECT_USAGE_REGISTER_HELPER(SP, SET, (x))))
20762#define INC_SP(x) (VM_REG_SP += (COLLECT_USAGE_REGISTER_HELPER(SP, SET, (x))))
20763#define DEC_SP(x) (VM_REG_SP -= (COLLECT_USAGE_REGISTER_HELPER(SP, SET, (x))))
20764#define SET_SV(x) (*GET_SP() = (x))
20765#define GET_ISEQ() (GET_CFP()->iseq)
20766#define GET_PREV_EP(ep) ((VALUE *)((ep)[VM_ENV_DATA_INDEX_SPECVAL] & ~0x03))
20767#define GET_SELF() (COLLECT_USAGE_REGISTER_HELPER(SELF, GET, GET_CFP()->self))
20768#define GET_BLOCK_HANDLER() (GET_LEP()[VM_ENV_DATA_INDEX_SPECVAL])
20769#define SETUP_CANARY()
20770#define CHECK_CANARY()
20771#define PREV_CLASS_SERIAL() (ruby_vm_class_serial)
20772#define NEXT_CLASS_SERIAL() (++ruby_vm_class_serial)
20773#define GET_GLOBAL_METHOD_STATE() (ruby_vm_global_method_state)
20774#define INC_GLOBAL_METHOD_STATE() (++ruby_vm_global_method_state)
20775#define GET_GLOBAL_CONSTANT_STATE() (ruby_vm_global_constant_state)
20776#define INC_GLOBAL_CONSTANT_STATE() (++ruby_vm_global_constant_state)
20777#define IS_ARGS_SPLAT(ci) ((ci)->flag & VM_CALL_ARGS_SPLAT)
20778#define IS_ARGS_KEYWORD(ci) ((ci)->flag & VM_CALL_KWARG)
20779#define IS_ARGS_KW_SPLAT(ci) ((ci)->flag & VM_CALL_KW_SPLAT)
20780#define IS_ARGS_KW_OR_KW_SPLAT(ci) ((ci)->flag & (VM_CALL_KWARG | VM_CALL_KW_SPLAT))
20781#define RUBY_VM_EXEC_H
20782#define debugs
20783#define DEBUG_ENTER_INSN(insn)
20784#define DEBUG_END_INSN()
20785#define throwdebug if(0)printf
20786#define LABEL(x) INSN_LABEL_ ##x
20787#define ELABEL(x) INSN_ELABEL_ ##x
20788#define LABEL_PTR(x) RB_GNUC_EXTENSION(&&LABEL(x))
20789#define INSN_ENTRY_SIG(insn) if (0) fprintf(stderr, "exec: %s@(%"PRIdPTRDIFF", %"PRIdPTRDIFF")@%s:%u\n", #insn, (reg_pc - reg_cfp->iseq->body->iseq_encoded), (reg_cfp->pc - reg_cfp->iseq->body->iseq_encoded), RSTRING_PTR(rb_iseq_path(reg_cfp->iseq)), rb_iseq_line_no(reg_cfp->iseq, reg_pc - reg_cfp->iseq->body->iseq_encoded));
20790#define INSN_DISPATCH_SIG(insn)
20791#define INSN_ENTRY(insn) LABEL(insn): INSN_ENTRY_SIG(insn);
20792#define TC_DISPATCH(insn) INSN_DISPATCH_SIG(insn); RB_GNUC_EXTENSION_BLOCK(goto *(void const *)GET_CURRENT_INSN()); ;
20793#define END_INSN(insn) DEBUG_END_INSN(); TC_DISPATCH(insn);
20794#define INSN_DISPATCH() TC_DISPATCH(__START__) {
20795#define END_INSNS_DISPATCH() rb_bug("unknown insn: %"PRIdVALUE, GET_CURRENT_INSN()); }
20796#define NEXT_INSN() TC_DISPATCH(__NEXT_INSN__)
20797#define START_OF_ORIGINAL_INSN(x) start_of_ ##x:
20798#define DISPATCH_ORIGINAL_INSN(x) goto start_of_ ##x;
20799#define VM_SP_CNT(ec,sp) ((sp) - (ec)->vm_stack)
20800#define THROW_EXCEPTION(exc) do { ec->errinfo = (VALUE)(exc); EC_JUMP_TAG(ec, ec->tag->state); } while (0)
20801#define SCREG(r) (reg_ ##r)
20802#define VM_DEBUG_STACKOVERFLOW 0
20803#define CHECK_VM_STACK_OVERFLOW_FOR_INSN(cfp,margin)
20804#define INSN_LABEL2(insn,name) INSN_LABEL_ ## insn ## _ ## name
20805#define INSN_LABEL(x) INSN_LABEL2(NAME_OF_CURRENT_INSN, x)
20806#define BIN(n) YARVINSN_ ##n
20807#define ASSERT_VM_INSTRUCTION_SIZE(array) STATIC_ASSERT(numberof_ ##array, numberof(array) == VM_INSTRUCTION_SIZE)
20808#define CONSTANT_H
20809#define RB_CONST_PRIVATE_P(ce) (((ce)->flag & CONST_VISIBILITY_MASK) == CONST_PRIVATE)
20810#define RB_CONST_PUBLIC_P(ce) (((ce)->flag & CONST_VISIBILITY_MASK) == CONST_PUBLIC)
20811#define RB_CONST_DEPRECATED_P(ce) ((ce)->flag & CONST_DEPRECATED)
20812#define vm_check_canary(ec,sp)
20813#define vm_check_frame(a,b,c,d)
20814#pragma GCC diagnostic push
20815#pragma GCC diagnostic ignored "-Waddress-of-packed-member"
20816#pragma GCC diagnostic pop
20817#pragma GCC diagnostic push
20818#pragma GCC diagnostic ignored "-Waddress-of-packed-member"
20819#pragma GCC diagnostic pop
20820#pragma GCC diagnostic push
20821#pragma GCC diagnostic ignored "-Waddress-of-packed-member"
20822#pragma GCC diagnostic pop
20823#pragma GCC diagnostic push
20824#pragma GCC diagnostic ignored "-Waddress-of-packed-member"
20825#pragma GCC diagnostic pop
20826#pragma GCC diagnostic push
20827#pragma GCC diagnostic ignored "-Waddress-of-packed-member"
20828#pragma GCC diagnostic pop
20829#pragma GCC diagnostic push
20830#pragma GCC diagnostic ignored "-Waddress-of-packed-member"
20831#pragma GCC diagnostic pop
20832#pragma GCC diagnostic push
20833#pragma GCC diagnostic ignored "-Waddress-of-packed-member"
20834#pragma GCC diagnostic pop
20835#define BUILTIN_CLASS_P(x,k) (!SPECIAL_CONST_P(x) && RBASIC_CLASS(x) == k)
20836#define EQ_UNREDEFINED_P(t) BASIC_OP_UNREDEFINED_P(BOP_EQ, t ##_REDEFINED_OP_FLAG)
20837#undef BUILTIN_CLASS_P
20838#undef EQ_UNREDEFINED_P
20839#define CHECK_CMP_NAN(a,b)
20840#pragma GCC diagnostic push
20841#pragma GCC diagnostic ignored "-Waddress-of-packed-member"
20842#pragma GCC diagnostic pop
20843#define KW_HASH_HAS_NO_KEYS 0
20844#define KW_HASH_HAS_SYMBOL_KEY 1
20845#define KW_HASH_HAS_OTHER_KEY 2
20846#define KW_HASH_HAS_BOTH_KEYS 3
20847#pragma GCC diagnostic push
20848#pragma GCC diagnostic ignored "-Waddress-of-packed-member"
20849#pragma GCC diagnostic pop
20850#define KW_SPECIFIED_BITS_MAX (32-1)
20851#define USE_OPT_HIST 0
20852#define CHECK_CFP_CONSISTENCY(func) (LIKELY(vm_cfp_consistent_p(ec, reg_cfp)) ? (void)0 : rb_bug(func ": cfp consistency error (%p, %p)", (void *)reg_cfp, (void *)(ec->cfp+1)))
20853#pragma GCC diagnostic push
20854#pragma GCC diagnostic ignored "-Waddress-of-packed-member"
20855#pragma GCC diagnostic pop
20856#pragma GCC diagnostic push
20857#pragma GCC diagnostic ignored "-Waddress-of-packed-member"
20858#pragma GCC diagnostic pop
20859#define id_cmp idCmp
20860#undef id_cmp
20861#pragma GCC diagnostic push
20862#pragma GCC diagnostic ignored "-Waddress-of-packed-member"
20863#pragma GCC diagnostic pop
20864#define VM_TRACE_HOOK(target_event,val) do { if ((pc_events & (target_event)) & enabled_flags) { vm_trace_hook(ec, reg_cfp, pc, pc_events, (target_event), global_hooks, local_hooks, (val)); } } while (0)
20865#define id_mesg idMesg
std::atomic< unsigned > rb_atomic_t
Type that is eligible for atomic operations.
Definition: atomic.h:69
static char rb_num2char_inline(VALUE x)
Converts an instance of rb_cNumeric into C's char.
Definition: char.h:73
static int rb_isdigit(int c)
Our own locale-insensitive version of isdigit(3).
Definition: ctype.h:302
static int rb_isupper(int c)
Our own locale-insensitive version of isupper(3).
Definition: ctype.h:232
static int rb_iscntrl(int c)
Our own locale-insensitive version of iscntrl(3).
Definition: ctype.h:418
static int rb_ispunct(int c)
Our own locale-insensitive version of ispunct(3).
Definition: ctype.h:465
static int rb_isalnum(int c)
Our own locale-insensitive version of isalnum(3).
Definition: ctype.h:326
static int rb_isxdigit(int c)
Our own locale-insensitive version of isxdigit(3).
Definition: ctype.h:349
static int rb_isspace(int c)
Our own locale-insensitive version of isspace(3).
Definition: ctype.h:395
static int rb_isascii(int c)
Our own locale-insensitive version of isascii(3).
Definition: ctype.h:209
static int rb_toupper(int c)
Our own locale-insensitive version of toupper(3).
Definition: ctype.h:539
unsigned long ruby_strtoul(const char *str, char **endptr, int base)
Our own locale-insensitive version of strtoul(3).
Definition: util.c:133
static int rb_tolower(int c)
Our own locale-insensitive version of tolower(3).
Definition: ctype.h:514
static int rb_isgraph(int c)
Our own locale-insensitive version of isgraph(3).
Definition: ctype.h:489
static int rb_isalpha(int c)
Our own locale-insensitive version of isalpha(3).
Definition: ctype.h:279
static int rb_islower(int c)
Our own locale-insensitive version of islower(3).
Definition: ctype.h:255
static int rb_isprint(int c)
Identical to rb_isgraph(), except it also returns true for ‘’ '`.
Definition: ctype.h:442
static int rb_isblank(int c)
Our own locale-insensitive version of isblank(3).
Definition: ctype.h:372
#define rb_define_method_id(klass, mid, func, arity)
Defines klass#mid.
Definition: cxxanyargs.hpp:673
#define rb_define_singleton_method(klass, mid, func, arity)
Defines klass.mid.
Definition: cxxanyargs.hpp:685
#define rb_define_protected_method(klass, mid, func, arity)
Defines klass#mid and makes it protected.
Definition: cxxanyargs.hpp:681
#define rb_define_private_method(klass, mid, func, arity)
Defines klass#mid and makes it private.
Definition: cxxanyargs.hpp:677
double rb_float_value(VALUE num)
Extracts its double value from an instance of rb_cFloat.
Definition: numeric.c:6418
VALUE rb_float_new_in_heap(double d)
Identical to rb_float_new(), except it does not generate Flonums.
Definition: numeric.c:1014
VALUE rb_float_new(double d)
Converts a C's double into an instance of rb_cFloat.
Definition: numeric.c:6425
void rb_add_event_hook(rb_event_hook_func_t func, rb_event_flag_t events, VALUE data)
Registers an event hook function.
Definition: vm_trace.c:186
int rb_remove_event_hook(rb_event_hook_func_t func)
Removes the passed function from the list of event hooks.
Definition: vm_trace.c:294
void(* rb_event_hook_func_t)(rb_event_flag_t evflag, VALUE data, VALUE self, ID mid, VALUE klass)
Type of event hooks.
Definition: event.h:115
uint32_t rb_event_flag_t
Represents event(s).
Definition: event.h:103
@ RUBY_FL_USHIFT
Number of bits in ruby_fl_type that are not open to users.
Definition: fl_type.h:167
static void rb_obj_freeze_inline(VALUE x)
Prevents further modifications to the given object.
Definition: fl_type.h:951
@ RUBY_FL_DUPPED
Definition: fl_type.h:439
@ RUBY_FL_PROMOTED1
This flag has something to do with our garbage collector.
Definition: fl_type.h:240
@ RUBY_ELTS_SHARED
This flag has something to do with data structures.
Definition: fl_type.h:405
@ RUBY_FL_USER9
User-defined flag.
Definition: fl_type.h:369
@ RUBY_FL_SINGLETON
This flag has something to do with an object's class.
Definition: fl_type.h:430
@ RUBY_FL_USER8
User-defined flag.
Definition: fl_type.h:368
@ RUBY_FL_USER11
User-defined flag.
Definition: fl_type.h:371
@ RUBY_FL_USER5
User-defined flag.
Definition: fl_type.h:365
@ RUBY_FL_TAINT
Definition: fl_type.h:278
@ RUBY_FL_USER3
User-defined flag.
Definition: fl_type.h:363
@ RUBY_FL_USER17
User-defined flag.
Definition: fl_type.h:377
@ RUBY_FL_USER10
User-defined flag.
Definition: fl_type.h:370
@ RUBY_FL_USER7
User-defined flag.
Definition: fl_type.h:367
@ RUBY_FL_WB_PROTECTED
Definition: fl_type.h:207
@ RUBY_FL_PROMOTED0
This flag has something to do with our garbage collector.
Definition: fl_type.h:223
@ RUBY_FL_USER14
User-defined flag.
Definition: fl_type.h:374
@ RUBY_FL_USER6
User-defined flag.
Definition: fl_type.h:366
@ RUBY_FL_USER16
User-defined flag.
Definition: fl_type.h:376
@ RUBY_FL_EXIVAR
This flag has something to do with instance variables.
Definition: fl_type.h:345
@ RUBY_FL_UNTRUSTED
Definition: fl_type.h:305
@ RUBY_FL_PROMOTED
This flag has something to do with our garbage collector.
Definition: fl_type.h:257
@ RUBY_FL_USER0
User-defined flag.
Definition: fl_type.h:360
@ RUBY_FL_FREEZE
This flag has something to do with data immutability.
Definition: fl_type.h:356
@ RUBY_FL_USER15
User-defined flag.
Definition: fl_type.h:375
@ RUBY_FL_SEEN_OBJ_ID
This flag has something to do with object IDs.
Definition: fl_type.h:332
@ RUBY_FL_USER2
User-defined flag.
Definition: fl_type.h:362
@ RUBY_FL_USER4
User-defined flag.
Definition: fl_type.h:364
@ RUBY_FL_USER18
User-defined flag.
Definition: fl_type.h:378
@ RUBY_FL_USER1
User-defined flag.
Definition: fl_type.h:361
@ RUBY_FL_FINALIZE
This flag has something to do with finalisers.
Definition: fl_type.h:271
@ RUBY_FL_USER19
User-defined flag.
Definition: fl_type.h:380
@ RUBY_FL_USER13
User-defined flag.
Definition: fl_type.h:373
@ RUBY_FL_USER12
User-defined flag.
Definition: fl_type.h:372
int ruby_glob(const char *pattern, int flags, ruby_glob_func *func, VALUE arg)
Identical to rb_glob(), except it returns opaque exception states instead of raising exceptions.
Definition: dir.c:2703
void rb_glob(const char *pattern, void(*func)(const char *path, VALUE arg, void *enc), VALUE arg)
The "glob" operator.
int ruby_brace_glob(const char *pattern, int flags, ruby_glob_func *func, VALUE arg)
Identical to ruby_glob(), @shyouhei currently suspects.
Definition: dir.c:2843
int ruby_glob_func(const char *path, VALUE arg, void *enc)
Type of a glob callback function.
Definition: glob.h:49
void rb_include_module(VALUE, VALUE)
Includes a module to a class.
Definition: class.c:1101
VALUE rb_define_class(const char *, VALUE)
Defines a top-level class.
Definition: class.c:896
void rb_extend_object(VALUE obj, VALUE module)
Extend the object with the module.
Definition: eval.c:1676
void rb_prepend_module(VALUE, VALUE)
Identical to rb_include_module(), except it "prepends" the passed module to the klass,...
Definition: class.c:1356
VALUE rb_define_class_under(VALUE, const char *, VALUE)
Defines a class under the namespace of outer.
Definition: class.c:928
VALUE rb_class_boot(VALUE)
A utility function that wraps class_alloc.
Definition: class.c:252
VALUE rb_define_module(const char *)
Defines a top-level module.
Definition: class.c:1006
void rb_class_modify_check(VALUE)
Asserts that klass is not a frozen class.
Definition: eval.c:422
VALUE rb_class_inherited(VALUE, VALUE)
Calls Class::inherited.
Definition: class.c:887
VALUE rb_define_module_under(VALUE, const char *)
Defines a module under the namespace of outer.
Definition: class.c:1030
VALUE rb_singleton_class_get(VALUE obj)
Returns the singleton class of obj, or nil if obj is not a singleton object.
Definition: class.c:2146
void rb_define_alias(VALUE, const char *, const char *)
Defines an alias of a method.
Definition: class.c:2208
void rb_define_module_function(VALUE module, const char *name, VALUE(*func)(ANYARGS), int argc)
Defines a module function for a module.
Definition: class.c:2192
void rb_need_block(void)
Declares that the current method needs a block.
Definition: eval.c:872
void rb_define_attr(VALUE, const char *, int, int)
Defines public accessor method(s) for an attribute.
Definition: class.c:2214
void rb_undef_method(VALUE, const char *)
Defines an undef of a method.
Definition: class.c:2030
void rb_define_method(VALUE klass, const char *name, VALUE(*func)(ANYARGS), int argc)
Defines a method.
Definition: class.c:2006
int rb_keyword_given_p(void)
Determines if the current method is given a keyword argument.
Definition: eval.c:864
int rb_block_given_p(void)
Determines if the current method is given a block.
Definition: eval.c:851
void rb_define_global_function(const char *name, VALUE(*func)(ANYARGS), int argc)
Defines a global function.
Definition: class.c:2202
#define rb_str_buf_new2
Old name of rb_str_buf_new_cstr.
Definition: string.h:1679
VALUE rb_complex_polar(VALUE x, VALUE y)
Old name of rb_complex_new_polar.
Definition: complex.c:1541
void ruby_stop(int ex)
Calls ruby_cleanup() and exits the process.
Definition: eval.c:289
int ruby_exec_node(void *n)
Identical to ruby_run_node(), except it returns an opaque execution status.
Definition: eval.c:325
int ruby_setup(void)
Initializes the VM and builtin libraries.
Definition: eval.c:65
void ruby_finalize(void)
Runs the VM finalization processes.
Definition: eval.c:168
void ruby_init_stack(volatile VALUE *addr)
Set stack bottom of Ruby implementation.
void ruby_script(const char *name)
Sets the current script name to this value.
Definition: ruby.c:2495
void ruby_set_argv(int argc, char **argv)
Sets argv that ruby understands.
Definition: ruby.c:2610
void ruby_set_script_name(VALUE name)
Identical to ruby_script(), except it takes the name as a Ruby String instance.
Definition: ruby.c:2508
int ruby_cleanup(int ex)
Destructs the VM.
Definition: eval.c:176
size_t ruby_stack_length(VALUE **p)
Queries what Ruby thinks is the machine stack.
Definition: gc.c:6248
int ruby_stack_check(void)
Checks for stack overflow.
Definition: gc.c:6288
void ruby_init_loadpath(void)
Sets up $LOAD_PATH.
Definition: ruby.c:619
void * ruby_process_options(int argc, char **argv)
Identical to ruby_options(), except it raises ruby-level exceptions on failure.
Definition: ruby.c:2625
void ruby_prog_init(void)
Defines built-in variables.
Definition: ruby.c:2578
void ruby_sig_finalize(void)
Clear signal handlers.
Definition: signal.c:1497
void ruby_incpush(const char *path)
Appends the given path to the end of the load path.
Definition: ruby.c:458
void rb_notimplement(void)
Definition: error.c:3144
void rb_mod_sys_fail(VALUE mod, const char *mesg)
Identical to rb_sys_fail(), except it takes additional module to extend the exception object before r...
Definition: error.c:3280
rb_warning_category_t
Warning categories.
Definition: error.h:43
VALUE rb_eLocalJumpError
LocalJumpError exception.
Definition: eval.c:48
void rb_raise(VALUE exc, const char *fmt,...)
Exception entry point.
Definition: error.c:3101
void rb_compile_warn(const char *file, int line, const char *fmt,...)
Identical to rb_compile_warning(), except it reports always regardless of runtime -W flag.
Definition: error.c:361
void rb_mod_syserr_fail(VALUE mod, int e, const char *mesg)
Identical to rb_mod_sys_fail(), except it does not depend on C global variable errno.
Definition: error.c:3294
VALUE rb_rescue2(VALUE(*b_proc)(VALUE), VALUE data1, VALUE(*r_proc)(VALUE, VALUE), VALUE data2,...)
An equivalent of rescue clause.
Definition: eval.c:880
void rb_exc_raise(VALUE mesg)
Raises an exception in the current thread.
Definition: eval.c:671
void rb_syserr_fail(int e, const char *mesg)
Raises appropriate exception that represents a C errno.
Definition: error.c:3213
void rb_bug(const char *fmt,...)
Interpreter panic switch.
Definition: error.c:803
void rb_iter_break(void)
Breaks from a block.
Definition: vm.c:1822
void rb_sys_fail(const char *mesg)
Converts a C errno into a Ruby exception, then raises it.
Definition: error.c:3225
VALUE rb_eZeroDivError
ZeroDivisionError exception.
Definition: numeric.c:194
void rb_readwrite_syserr_fail(enum rb_io_wait_readwrite waiting, int err, const char *msg)
Identical to rb_readwrite_sys_fail(), except it does not depend on C global variable errno.
Definition: io.c:14003
void rb_sys_warning(const char *fmt,...)
Identical to rb_sys_fail(), except it does not raise an exception to render a warning instead.
Definition: error.c:3362
VALUE rb_eIOError
IOError exception.
Definition: io.c:188
VALUE rb_syserr_new_str(int n, VALUE arg)
Identical to rb_syserr_new(), except it takes the message in Ruby's String instead of C's.
Definition: error.c:3207
void rb_mod_syserr_fail_str(VALUE mod, int e, VALUE mesg)
Identical to rb_mod_syserr_fail(), except it takes the message in Ruby's String instead of C's.
Definition: error.c:3301
void rb_error_frozen(const char *what)
Identical to rb_frozen_error_raise(), except its raising exception has a message like "can't modify f...
Definition: error.c:3417
void rb_set_errinfo(VALUE err)
Sets the current exception ($!) to the given value.
Definition: eval.c:1861
VALUE rb_eRegexpError
RegexpError exception.
Definition: re.c:30
void rb_syserr_fail_str(int e, VALUE mesg)
Identical to rb_syserr_fail(), except it takes the message in Ruby's String instead of C's.
Definition: error.c:3219
VALUE rb_eEOFError
EOFError exception.
Definition: io.c:187
VALUE rb_vrescue2(VALUE(*b_proc)(VALUE), VALUE data1, VALUE(*r_proc)(VALUE, VALUE), VALUE data2, va_list args)
Identical to rb_rescue2(), except it takes va_list instead of variadic number of arguments.
Definition: eval.c:891
void rb_fatal(const char *fmt,...)
Raises the unsung "fatal" exception.
Definition: error.c:3152
void rb_readwrite_sys_fail(enum rb_io_wait_readwrite waiting, const char *msg)
Raises appropriate exception using the parameters.
Definition: io.c:13997
void rb_iter_break_value(VALUE val)
Identical to rb_iter_break(), except it additionally takes the "value" of this breakage.
Definition: vm.c:1828
void rb_invalid_str(const char *str, const char *type)
Honestly I don't understand the name, but it raises an instance of rb_eArgError.
Definition: error.c:2160
void rb_exc_fatal(VALUE mesg)
Raises a fatal error in the current thread.
Definition: eval.c:684
VALUE * rb_ruby_verbose_ptr(void)
This is an implementation detail of ruby_verbose.
Definition: vm.c:4011
VALUE rb_eStopIteration
StopIteration exception.
Definition: enumerator.c:141
VALUE rb_eFloatDomainError
FloatDomainError exception.
Definition: numeric.c:195
const char void rb_warn(const char *,...)
Identical to rb_warning(), except it reports always regardless of runtime -W flag.
Definition: error.c:419
void rb_error_frozen_object(VALUE frozen_obj)
Identical to rb_error_frozen(), except it takes arbitrary Ruby object instead of C's string.
Definition: error.c:3449
void rb_bug_errno(const char *mesg, int errno_arg)
This is a wrapper of rb_bug() which automatically constructs appropriate message from the passed errn...
Definition: error.c:831
void rb_compile_warning(const char *file, int line, const char *fmt,...)
Issues a compile-time warning that happens at __file__:__line__.
Definition: error.c:376
VALUE rb_rescue(VALUE(*b_proc)(VALUE), VALUE data1, VALUE(*r_proc)(VALUE, VALUE), VALUE data2)
Identical to rb_rescue2(), except it does not take a list of exception classes.
Definition: eval.c:951
VALUE * rb_ruby_debug_ptr(void)
This is an implementation detail of ruby_debug.
Definition: vm.c:4018
VALUE rb_ensure(VALUE(*b_proc)(VALUE), VALUE data1, VALUE(*e_proc)(VALUE), VALUE data2)
An equivalent to ensure clause.
Definition: eval.c:980
VALUE rb_errinfo(void)
This is the same as $! in Ruby.
Definition: eval.c:1855
VALUE rb_eSysStackError
SystemStackError exception.
Definition: eval.c:49
VALUE rb_syserr_new(int, const char *)
Creates an exception object that represents the given C errno.
Definition: error.c:3199
void rb_sys_fail_str(VALUE mesg)
Identical to rb_sys_fail(), except it takes the message in Ruby's String instead of C's.
Definition: error.c:3231
void rb_unexpected_type(VALUE x, int t)
Fails with the given object's type incompatibility to the type.
Definition: error.c:1030
void rb_mod_sys_fail_str(VALUE mod, VALUE mesg)
Identical to rb_mod_sys_fail(), except it takes the message in Ruby's String instead of C's.
Definition: error.c:3287
VALUE rb_eThreadError
ThreadError exception.
Definition: eval.c:869
void rb_exit(int status)
Terminates the current execution context.
Definition: process.c:4503
VALUE rb_eMathDomainError
Math::DomainError exception.
Definition: math.c:30
void rb_check_type(VALUE x, int t)
This was the old implementation of Check_Type(), but they diverged.
Definition: error.c:1007
void rb_warning(const char *fmt,...)
Issues a warning.
Definition: error.c:450
@ RB_WARN_CATEGORY_DEPRECATED
Warning is for deprecated features.
Definition: error.h:48
@ RB_WARN_CATEGORY_EXPERIMENTAL
Warning is for experimental features.
Definition: error.h:51
@ RB_WARN_CATEGORY_NONE
Category unspecified.
Definition: error.h:45
VALUE rb_cRational
Rational class.
Definition: rational.c:47
VALUE rb_class_superclass(VALUE)
Returns the superclass of klass.
Definition: object.c:1963
VALUE rb_cUnboundMethod
UnboundMethod class.
Definition: proc.c:46
VALUE rb_cTime
Time class.
Definition: time.c:647
VALUE rb_cDir
Dir class.
Definition: dir.c:458
VALUE rb_cComplex
Complex class.
Definition: complex.c:38
VALUE rb_cArray
Array class.
Definition: array.c:40
VALUE rb_mProcess
Process module.
Definition: process.c:8764
VALUE rb_mMath
Math module.
Definition: math.c:29
VALUE rb_cIO
IO class.
Definition: io.c:186
VALUE rb_mEnumerable
Enumerable module.
Definition: enum.c:27
VALUE rb_cMatch
MatchData class.
Definition: re.c:956
VALUE rb_cStruct
Struct class.
Definition: struct.c:31
VALUE rb_cEnumerator
Enumerator class.
Definition: enumerator.c:126
VALUE rb_cInteger
Module class.
Definition: numeric.c:192
VALUE rb_stdin
STDIN constant.
Definition: io.c:199
VALUE rb_cStat
File::Stat class.
Definition: file.c:176
VALUE rb_Hash(VALUE)
Equivalent to Kernel#Hash in Ruby.
Definition: object.c:3661
VALUE rb_cBinding
Binding class.
Definition: proc.c:48
VALUE rb_cRegexp
Regexp class.
Definition: re.c:2459
VALUE rb_obj_frozen_p(VALUE obj)
Just calls RB_OBJ_FROZEN() inside.
Definition: object.c:1159
VALUE rb_mGC
GC module.
Definition: gc.c:1151
VALUE rb_obj_init_copy(VALUE, VALUE)
Default implementation of #initialize_copy.
Definition: object.c:501
VALUE rb_cHash
Hash class.
Definition: hash.c:92
VALUE rb_stderr
STDERR constant.
VALUE rb_cNumeric
Numeric class.
Definition: numeric.c:190
static VALUE rb_class_of(VALUE obj)
Object to class mapping function.
Definition: globals.h:172
VALUE rb_cRandom
Random class.
Definition: random.c:229
VALUE rb_cEncoding
Encoding class.
Definition: encoding.c:57
VALUE rb_cSymbol
Sumbol class.
Definition: string.c:80
VALUE rb_cThread
Thread class.
Definition: vm.c:401
VALUE rb_class_inherited_p(VALUE scion, VALUE ascendant)
Determines if the given two modules are relatives.
Definition: object.c:1575
VALUE rb_cRange
Range class.
Definition: range.c:31
VALUE rb_class_real(VALUE klass)
Finds a "real" class.
Definition: object.c:178
VALUE rb_mFileTest
FileTest module.
Definition: file.c:175
VALUE rb_mWaitReadable
IO::WaitReadable module.
Definition: io.c:189
VALUE rb_mWaitWritable
IO::WaitReadable module.
Definition: io.c:190
VALUE rb_mComparable
Comparable module.
Definition: compar.c:19
VALUE rb_class_search_ancestor(VALUE klass, VALUE super)
Internal header for Object.
Definition: object.c:810
VALUE rb_cFloat
Float class.
Definition: numeric.c:191
VALUE rb_cProc
Proc class.
Definition: proc.c:49
VALUE rb_cFile
File class.
Definition: file.c:174
VALUE rb_stdout
STDOUT constant.
VALUE rb_cString
String class.
Definition: string.c:79
VALUE rb_cMethod
Method class.
Definition: proc.c:47
int ruby_run_node(void *n)
Runs the given compiled source and exits this process.
Definition: eval.c:312
void ruby_init(void)
Calls ruby_setup() and check error.
Definition: eval.c:98
void * ruby_options(int argc, char **argv)
Processes command line arguments and compiles the Ruby source to execute.
Definition: eval.c:109
void ruby_show_copyright(void)
Prints the copyright notice of the CRuby interpreter to stdout.
Definition: version.c:145
void ruby_sysinit(int *argc, char ***argv)
Initializes the process for libruby.
Definition: ruby.c:2678
void ruby_show_version(void)
Prints the version information of the CRuby interpreter to stdout.
Definition: version.c:123
int ruby_executable_node(void *n, int *status)
Checks the return value of ruby_options().
Definition: eval.c:295
VALUE rb_eval_string_wrap(const char *str, int *state)
Identical to rb_eval_string_protect(), except it evaluates the given string under a module binding in...
Definition: vm_eval.c:1868
VALUE rb_funcall_passing_block(VALUE recv, ID mid, int argc, const VALUE *argv)
Identical to rb_funcallv_public(), except you can pass the passed block.
Definition: vm_eval.c:1165
VALUE rb_funcall(VALUE recv, ID mid, int n,...)
Calls a method.
Definition: vm_eval.c:1102
VALUE rb_funcallv_kw(VALUE recv, ID mid, int argc, const VALUE *argv, int kw_splat)
Identical to rb_funcallv(), except you can specify how to handle the last element of the given array.
Definition: vm_eval.c:1069
VALUE rb_funcallv(VALUE recv, ID mid, int argc, const VALUE *argv)
Identical to rb_funcall(), except it takes the method arguments as a C array.
Definition: vm_eval.c:1061
VALUE rb_funcall_with_block(VALUE recv, ID mid, int argc, const VALUE *argv, VALUE procval)
Identical to rb_funcallv_public(), except you can pass a block.
Definition: vm_eval.c:1179
VALUE rb_eval_string_protect(const char *str, int *state)
Identical to rb_eval_string(), except it avoids potential global escapes.
Definition: vm_eval.c:1847
VALUE rb_call_super_kw(int argc, const VALUE *argv, int kw_splat)
Identical to rb_call_super(), except you can specify how to handle the last element of the given arra...
Definition: vm_eval.c:330
VALUE rb_funcallv_public(VALUE recv, ID mid, int argc, const VALUE *argv)
Identical to rb_funcallv(), except it only takes public methods into account.
Definition: vm_eval.c:1153
VALUE rb_current_receiver(void)
This resembles ruby's self.
Definition: vm_eval.c:344
VALUE rb_funcall_passing_block_kw(VALUE recv, ID mid, int argc, const VALUE *argv, int kw_splat)
Identical to rb_funcallv_passing_block(), except you can specify how to handle the last element of th...
Definition: vm_eval.c:1172
VALUE rb_funcall_with_block_kw(VALUE recv, ID mid, int argc, const VALUE *argv, VALUE procval, int kw_splat)
Identical to rb_funcallv_with_block(), except you can specify how to handle the last element of the g...
Definition: vm_eval.c:1189
VALUE rb_eval_string(const char *str)
Evaluates the given string in an isolated binding.
Definition: vm_eval.c:1835
VALUE rb_call_super(int argc, const VALUE *argv)
This resembles ruby's super.
Definition: vm_eval.c:338
VALUE rb_funcallv_public_kw(VALUE recv, ID mid, int argc, const VALUE *argv, int kw_splat)
Identical to rb_funcallv_public(), except you can specify how to handle the last element of the given...
Definition: vm_eval.c:1159
void rb_gc_register_address(VALUE *valptr)
Inform the garbage collector that valptr points to a live Ruby object that should not be moved.
Definition: gc.c:8969
void rb_gc_unregister_address(VALUE *valptr)
Inform the garbage collector that a pointer previously passed to rb_gc_register_address() no longer p...
Definition: gc.c:8981
void rb_global_variable(VALUE *)
An alias for rb_gc_register_address().
Definition: gc.c:9004
void rb_gc_register_mark_object(VALUE object)
Inform the garbage collector that object is a live Ruby object that should not be moved.
Definition: gc.c:8948
VALUE rb_ary_rotate(VALUE ary, long rot)
Destructively rotates the passed array in-place to towards its end.
Definition: array.c:3251
VALUE rb_ary_new_from_values(long n, const VALUE *elts)
Identical to rb_ary_new_from_args(), except how objects are passed.
Definition: array.c:840
VALUE rb_ary_cmp(VALUE lhs, VALUE rhs)
Recursively compares each elements of the two arrays one-by-one using <=>.
Definition: array.c:5438
VALUE rb_ary_rassoc(VALUE alist, VALUE key)
Identical to rb_ary_assoc(), except it scans the passed array from the opposite direction.
Definition: array.c:5187
VALUE rb_ary_concat(VALUE lhs, VALUE rhs)
Destructively appends the contents of latter into the end of former.
Definition: array.c:5074
VALUE rb_ary_assoc(VALUE alist, VALUE key)
Looks up the passed key, assuming the passed array is an alist.
Definition: array.c:5157
VALUE rb_ary_reverse(VALUE ary)
Destructively reverses the passed array in-place.
Definition: array.c:3164
VALUE rb_ary_shared_with_p(VALUE lhs, VALUE rhs)
Queries if the passed two arrays share the same backend storage.
Definition: array.c:719
VALUE rb_ary_shift(VALUE ary)
Destructively deletes an element from the beginning of the passed array and returns what was deleted.
Definition: array.c:1526
VALUE rb_ary_sort(VALUE ary)
Creates a copy of the passed array, whose elements are sorted according to their <=> result.
Definition: array.c:3602
VALUE rb_ary_resurrect(VALUE ary)
I guess there is no use case of this function in extension libraries, but this is a routine identical...
Definition: array.c:2833
VALUE rb_ary_dup(VALUE ary)
Duplicates an array.
Definition: array.c:2820
VALUE rb_ary_includes(VALUE ary, VALUE elem)
Queries if the passed array has the passed entry.
Definition: array.c:5357
VALUE rb_ary_aref(int argc, const VALUE *argv, VALUE ary)
Queries element(s) of an array.
Definition: array.c:1903
VALUE rb_get_values_at(VALUE obj, long olen, int argc, const VALUE *argv, VALUE(*func)(VALUE obj, long oidx))
This was a generalisation of Array#values_at, Struct#values_at, and MatchData#values_at.
void rb_ary_free(VALUE ary)
Destroys the given array for no reason.
Definition: array.c:935
VALUE rb_ary_each(VALUE ary)
Iteratively yields each element of the passed array to the implicitly passed block if any.
Definition: array.c:2660
VALUE rb_ary_delete_at(VALUE ary, long pos)
Destructively removes an element which resides at the specific index of the passed array.
Definition: array.c:4160
VALUE rb_ary_unshift(VALUE ary, VALUE elem)
Destructively prepends the passed item at the beginning of the passed array.
Definition: array.c:1744
VALUE rb_ary_plus(VALUE lhs, VALUE rhs)
Creates a new array, concatenating the former to the latter.
Definition: array.c:5014
VALUE rb_ary_cat(VALUE ary, const VALUE *train, long len)
Destructively appends multiple elements at the end of the array.
Definition: array.c:1422
void rb_ary_modify(VALUE ary)
Declares that the array is about to be modified.
Definition: array.c:637
VALUE rb_ary_replace(VALUE copy, VALUE orig)
Replaces the contents of the former object with the contents of the latter.
Definition: array.c:4664
VALUE rb_check_array_type(VALUE obj)
Try converting an object to its array representation using its to_ary method, if any.
Definition: array.c:1061
VALUE rb_ary_to_ary(VALUE obj)
Force converts an object to an array.
Definition: array.c:2252
VALUE rb_ary_new(void)
Allocates a new, empty array.
Definition: array.c:801
VALUE rb_ary_new_capa(long capa)
Identical to rb_ary_new(), except it additionally specifies how many rooms of objects it should alloc...
Definition: array.c:795
VALUE rb_ary_resize(VALUE ary, long len)
Expands or shrinks the passed array to the passed length.
Definition: array.c:2346
VALUE rb_ary_pop(VALUE ary)
Destructively deletes an element from the end of the passed array and returns what was deleted.
Definition: array.c:1460
VALUE rb_ary_tmp_new(long capa)
Allocates a "temporary" array.
Definition: array.c:917
VALUE rb_ary_clear(VALUE ary)
Destructively removes everything form an array.
Definition: array.c:4720
VALUE rb_ary_subseq(VALUE ary, long beg, long len)
Obtains a part of the passed array.
Definition: array.c:1790
VALUE rb_ary_push(VALUE ary, VALUE elem)
Special case of rb_ary_cat() that it adds only one element.
Definition: array.c:1409
VALUE rb_ary_freeze(VALUE obj)
Just another name of rb_obj_freeze.
Definition: array.c:706
VALUE rb_ary_to_s(VALUE ary)
Converts an array into a human-readable string.
Definition: array.c:3054
VALUE rb_ary_new_from_args(long n,...)
Constructs an array from the passed objects.
Definition: array.c:807
VALUE rb_ary_entry(VALUE ary, long off)
Queries an element of an array.
Definition: array.c:1762
VALUE rb_ary_sort_bang(VALUE ary)
Destructively sorts the passed array in-place, according to each elements' <=> result.
Definition: array.c:3499
VALUE rb_assoc_new(VALUE car, VALUE cdr)
Identical to rb_ary_new_from_values(), except it expects exactly two parameters.
Definition: array.c:1048
void rb_mem_clear(VALUE *buf, long len)
Fills the memory region with a series of RUBY_Qnil.
Definition: array.c:289
VALUE rb_ary_delete(VALUE ary, VALUE elem)
Destructively removes elements from the passed array, so that there would be no elements inside that ...
Definition: array.c:4106
VALUE rb_ary_join(VALUE ary, VALUE sep)
Recursively stringises the elements of the passed array, flattens that result, then joins the sequenc...
Definition: array.c:2934
void rb_ary_store(VALUE ary, long key, VALUE val)
Destructively stores the passed value to the passed array's passed index.
Definition: array.c:1245
int rb_integer_pack(VALUE val, void *words, size_t numwords, size_t wordsize, size_t nails, int flags)
Exports an integer into a buffer.
Definition: bignum.c:3577
VALUE rb_big_lshift(VALUE x, VALUE y)
Performs shift left.
Definition: bignum.c:6636
VALUE rb_big_and(VALUE x, VALUE y)
Performs bitwise and of the passed two objects.
Definition: bignum.c:6375
VALUE rb_big_or(VALUE x, VALUE y)
Performs bitwise or of the passed two objects.
Definition: bignum.c:6494
VALUE rb_big_minus(VALUE x, VALUE y)
Performs subtraction of the passed two objects.
Definition: bignum.c:5868
VALUE rb_big_modulo(VALUE x, VALUE y)
Performs modulo of the passed two objects.
Definition: bignum.c:6118
VALUE rb_big_new(size_t len, int sign)
Allocates a bignum object.
Definition: bignum.c:3043
VALUE rb_big_pow(VALUE x, VALUE y)
Raises x to the powerof y.
Definition: bignum.c:6259
int rb_bigzero_p(VALUE x)
Queries if the passed bignum instance is a "bigzro".
Definition: bignum.c:2947
VALUE rb_big_plus(VALUE x, VALUE y)
Performs addition of the passed two objects.
Definition: bignum.c:5839
VALUE rb_str_to_inum(VALUE str, int base, int badcheck)
Identical to rb_cstr2inum(), except it takes Ruby's strings instead of C's.
Definition: bignum.c:4298
VALUE rb_big_clone(VALUE num)
Duplicates the given bignum.
Definition: bignum.c:3049
size_t rb_absint_size(VALUE val, int *nlz_bits_ret)
Calculates the number of bytes needed to represent the absolute value of the passed integer.
Definition: bignum.c:3276
size_t rb_absint_numwords(VALUE val, size_t word_numbits, size_t *nlz_bits_ret)
Calculates the number of words needed represent the absolute value of the passed integer.
Definition: bignum.c:3411
int rb_absint_singlebit_p(VALUE val)
Tests abs(val) consists only of a bit or not.
Definition: bignum.c:3476
VALUE rb_integer_unpack(const void *words, size_t numwords, size_t wordsize, size_t nails, int flags)
Import an integer from a buffer.
Definition: bignum.c:3663
unsigned long rb_big2ulong(VALUE x)
Converts a bignum into C's unsigned long.
Definition: bignum.c:5148
VALUE rb_big_idiv(VALUE x, VALUE y)
Performs "integer division".
Definition: bignum.c:6112
void rb_big_2comp(VALUE num)
Destructively modify the passed bignum into 2's complement representation.
Definition: bignum.c:3078
VALUE rb_big2str(VALUE x, int base)
Generates a place-value representation of the passed integer.
Definition: bignum.c:5114
VALUE rb_big_cmp(VALUE lhs, VALUE rhs)
Compares the passed two bignums.
Definition: bignum.c:5436
VALUE rb_str2inum(VALUE str, int base)
Identical to rb_str_to_inum(), except the second argument controls the base and badcheck at once.
Definition: bignum.c:4574
VALUE rb_dbl2big(double d)
Converts a C's double into a bignum.
Definition: bignum.c:5272
VALUE rb_big_mul(VALUE x, VALUE y)
Performs multiplication of the passed two objects.
Definition: bignum.c:5948
VALUE rb_big_eql(VALUE lhs, VALUE rhs)
Equality, in terms of eql?.
Definition: bignum.c:5560
VALUE rb_cstr2inum(const char *str, int base)
Identical to rb_cstr_to_inum(), except the second argument controls the base and badcheck at once.
Definition: bignum.c:4568
int rb_uv_to_utf8(char buf[6], unsigned long uv)
Encodes a Unicode codepoint into its UTF-8 representation.
Definition: pack.c:1637
VALUE rb_big_unpack(unsigned long *buf, long num_longs)
Constructs a (possibly very big) bignum from a series of integers.
Definition: bignum.c:3252
VALUE rb_big_divmod(VALUE x, VALUE y)
Performs "divmod" operation.
Definition: bignum.c:6150
VALUE rb_big_xor(VALUE x, VALUE y)
Performs exclusive or of the passed two objects.
Definition: bignum.c:6588
VALUE rb_big_div(VALUE x, VALUE y)
Performs division of the passed two objects.
Definition: bignum.c:6106
VALUE rb_big_norm(VALUE x)
Normalises the passed bignum.
Definition: bignum.c:3181
VALUE rb_cstr_to_inum(const char *str, int base, int badcheck)
Parses C's string to convert into a Ruby's integer.
Definition: bignum.c:4040
void rb_big_pack(VALUE val, unsigned long *buf, long num_longs)
Converts a bignum into a series of its parts.
Definition: bignum.c:3244
VALUE rb_big_rshift(VALUE x, VALUE y)
Performs shift right.
Definition: bignum.c:6666
double rb_big2dbl(VALUE x)
Converts a bignum into C's double.
Definition: bignum.c:5333
long rb_big2long(VALUE x)
Converts a bignum into C's long.
Definition: bignum.c:5163
void rb_big_resize(VALUE big, size_t len)
Destructively resizes the backend storage of the passed bignum.
Definition: bignum.c:3017
VALUE rb_big_eq(VALUE lhs, VALUE rhs)
Equality, in terms of ==.
Definition: bignum.c:5541
void rb_undef(VALUE mod, ID mid)
Inserts a method entry that hides previous method definition of the given name.
Definition: vm_method.c:1751
int rb_cmpint(VALUE val, VALUE a, VALUE b)
Canonicalises the passed val, which is the return value of a <=> b, into C's {-1, 0,...
Definition: bignum.c:2953
void rb_cmperr(VALUE a, VALUE b)
Raises "comparison failed" error.
Definition: compar.c:28
VALUE rb_complex_uminus(VALUE z)
Performs negation of the passed object.
Definition: complex.c:759
VALUE rb_complex_div(VALUE x, VALUE y)
Performs division of the passed two objects.
Definition: complex.c:949
VALUE rb_complex_new(VALUE real, VALUE imag)
Constructs a Complex, by first multiplying the imaginary part with 1i then adds it to the real part.
Definition: complex.c:1529
VALUE rb_complex_plus(VALUE x, VALUE y)
Performs addition of the passed two objects.
Definition: complex.c:779
VALUE rb_complex_new_polar(VALUE abs, VALUE arg)
Constructs a Complex using polar representations.
Definition: complex.c:1535
VALUE rb_complex_arg(VALUE z)
Queries the argument (or the angle) of the passed object.
Definition: complex.c:1209
VALUE rb_complex_raw(VALUE real, VALUE imag)
Identical to rb_complex_new(), except it assumes both arguments are not instances of rb_cComplex.
Definition: complex.c:1523
VALUE rb_dbl_complex_new(double real, double imag)
Identical to rb_complex_new(), except it takes the arguments as C's double instead of Ruby's object.
Definition: complex.c:1556
VALUE rb_complex_abs(VALUE z)
Queries the absolute (or the magnitude) of the passed object.
Definition: complex.c:1162
VALUE rb_complex_real(VALUE z)
Queries the real part of the passed Complex.
Definition: complex.c:727
VALUE rb_complex_mul(VALUE x, VALUE y)
Performs multiplication of the passed two objects.
Definition: complex.c:873
VALUE rb_complex_conjugate(VALUE z)
Performs complex conjugation of the passed object.
Definition: complex.c:1255
VALUE rb_Complex(VALUE real, VALUE imag)
Converts various values into a Complex.
Definition: complex.c:1547
VALUE rb_complex_minus(VALUE x, VALUE y)
Performs subtraction of the passed two objects.
Definition: complex.c:813
VALUE rb_complex_pow(VALUE base, VALUE exp)
Performs exponentiation of the passed two objects.
Definition: complex.c:986
VALUE rb_complex_imag(VALUE z)
Queries the imaginary part of the passed Complex.
Definition: complex.c:744
VALUE rb_fiber_current(void)
Queries the fiber which is calling this function.
Definition: cont.c:2254
VALUE rb_fiber_yield_kw(int argc, const VALUE *argv, int kw_splat)
Identical to rb_fiber_yield(), except you can specify how to handle the last element of the given arr...
Definition: cont.c:2503
VALUE rb_fiber_resume_kw(VALUE fiber, int argc, const VALUE *argv, int kw_splat)
Identical to rb_fiber_resume(), except you can specify how to handle the last element of the given ar...
Definition: cont.c:2491
VALUE rb_fiber_alive_p(VALUE fiber)
Queries the liveness of the passed fiber.
Definition: cont.c:2531
VALUE rb_fiber_new(rb_block_call_func_t func, VALUE callback_obj)
Creates a Fiber instance from a C-backended block.
Definition: cont.c:1969
VALUE rb_obj_is_fiber(VALUE obj)
Queries if an object is a fiber.
Definition: cont.c:1135
VALUE rb_fiber_yield(int argc, const VALUE *argv)
Yields the control back to the point where the current fiber was resumed.
Definition: cont.c:2509
VALUE rb_fiber_resume(VALUE fiber, int argc, const VALUE *argv)
Resumes the execution of the passed fiber, either from the point at which the last rb_fiber_yield() w...
Definition: cont.c:2497
VALUE rb_dir_getwd(void)
Queries the path of the current working directory of the current process.
Definition: dir.c:1124
VALUE rb_enum_values_pack(int argc, const VALUE *argv)
Basically identical to rb_ary_new_form_values(), except it returns something different when argc < 2.
Definition: enum.c:53
VALUE rb_enumeratorize_with_size(VALUE recv, VALUE meth, int argc, const VALUE *argv, rb_enumerator_size_func *func)
Identical to rb_enumeratorize(), except you can additionally specify the size function of return valu...
Definition: enumerator.c:536
VALUE rb_enumeratorize(VALUE recv, VALUE meth, int argc, const VALUE *argv)
Constructs an enumerator.
Definition: enumerator.c:511
VALUE rb_enumeratorize_with_size_kw(VALUE recv, VALUE meth, int argc, const VALUE *argv, rb_enumerator_size_func *func, int kw_splat)
Identical to rb_enumeratorize_with_func(), except you can specify how to handle the last element of t...
Definition: enumerator.c:520
int rb_arithmetic_sequence_extract(VALUE as, rb_arithmetic_sequence_components_t *buf)
Extracts components of the passed arithmetic sequence.
Definition: enumerator.c:3429
VALUE rb_enumerator_size_func(VALUE recv, VALUE argv, VALUE eobj)
This is the type of functions that rb_enumeratorize_with_size() expects.
Definition: enumerator.h:45
static int rb_check_arity(int argc, int min, int max)
Ensures that the passed integer is in the passed range.
Definition: error.h:280
ID rb_frame_callee(void)
Identical to rb_frame_this_func(), except it returns the named used to call the method.
Definition: eval.c:1042
ID rb_frame_this_func(void)
Queries the name of the Ruby level method that is calling this function.
Definition: eval.c:1036
void rb_obj_call_init(VALUE obj, int argc, const VALUE *argv)
Calls initialize method of the passed object with the passed arguments.
Definition: eval.c:1663
VALUE rb_f_abort(int argc, const VALUE *argv)
This is similar to rb_f_exit().
Definition: process.c:4581
void rb_interrupt(void)
Raises an instance of rb_eInterrupt.
Definition: eval.c:690
VALUE rb_f_exit(int argc, const VALUE *argv)
Identical to rb_exit(), except how arguments are passed.
Definition: process.c:4516
VALUE rb_make_exception(int argc, const VALUE *argv)
Constructs an exception object from the list of arguments, in a manner similar to Ruby's raise.
Definition: eval.c:818
void rb_jump_tag(int state)
This function is to re-throw global escapes.
Definition: eval.c:842
void rb_obj_call_init_kw(VALUE, int, const VALUE *, int)
Identical to rb_obj_call_init(), except you can specify how to handle the last element of the given a...
Definition: eval.c:1669
void rb_set_end_proc(void(*func)(VALUE arg), VALUE arg)
Registers a function that shall run on process exit.
VALUE rb_find_file(VALUE path)
Identical to rb_find_file_ext(), except it takes a feature name and is extension at once,...
Definition: file.c:6467
VALUE rb_file_s_absolute_path(int argc, const VALUE *argv)
Identical to rb_file_absolute_path(), except how arguments are passed.
Definition: file.c:4141
VALUE rb_str_encode_ospath(VALUE path)
Converts a string into an "OS Path" encoding, if any.
Definition: file.c:251
int rb_is_absolute_path(const char *path)
Queries if the given path is an absolute path.
Definition: file.c:6232
int rb_find_file_ext(VALUE *feature, const char *const *exts)
Resolves a feature's path.
Definition: file.c:6408
VALUE rb_file_s_expand_path(int argc, const VALUE *argv)
Identical to rb_file_expand_path(), except how arguments are passed.
Definition: file.c:4093
VALUE rb_file_directory_p(VALUE _, VALUE path)
Queries if the given path is either a directory, or a symlink that (potentially recursively) points t...
Definition: file.c:1609
VALUE rb_file_expand_path(VALUE fname, VALUE dname)
Identical to rb_file_absolute_path(), except it additionally understands ~.
Definition: file.c:4080
VALUE rb_file_dirname(VALUE fname)
Strips a file path's last component (and trailing separators if any).
Definition: file.c:4747
VALUE rb_file_absolute_path(VALUE fname, VALUE dname)
Maps a relative path to its absolute representation.
Definition: file.c:4134
void rb_gc_mark(VALUE obj)
Marks an object.
Definition: gc.c:6900
void rb_mark_tbl_no_pin(struct st_table *tbl)
Identical to rb_mark_tbl(), except it marks objects using rb_gc_mark_movable().
Definition: gc.c:6687
void rb_memerror(void)
Triggers out-of-memory error.
Definition: gc.c:11610
size_t rb_gc_stat(VALUE key_or_buf)
Obtains various GC related profiles.
Definition: gc.c:10986
void rb_gc_mark_movable(VALUE obj)
Maybe this is the only function provided for C extensions to control the pinning of objects,...
Definition: gc.c:6894
VALUE rb_gc_disable(void)
Disables GC.
Definition: gc.c:11189
VALUE rb_gc_start(void)
Identical to rb_gc(), except the return value.
Definition: gc.c:10620
VALUE rb_gc_latest_gc_info(VALUE key_or_buf)
Obtains various info regarding the most recent GC run.
Definition: gc.c:10764
void rb_mark_tbl(struct st_table *tbl)
Identical to rb_mark_hash(), except it marks only values of the table and leave their associated keys...
Definition: gc.c:6681
VALUE rb_gc_enable(void)
(Re-) enables GC.
Definition: gc.c:11152
void rb_mark_hash(struct st_table *tbl)
Marks keys and values associated inside of the given table.
Definition: gc.c:6486
VALUE rb_undefine_finalizer(VALUE obj)
Modifies the object so that it has no finalisers at all.
Definition: gc.c:4049
int rb_during_gc(void)
Queries if the GC is busy.
Definition: gc.c:10635
void rb_gc_mark_maybe(VALUE obj)
Identical to rb_gc_mark(), except it allows the passed value be a non-object.
Definition: gc.c:6719
VALUE rb_gc_location(VALUE obj)
Finds a new "location" of an object.
Definition: gc.c:10035
void rb_gc_mark_locations(const VALUE *start, const VALUE *end)
Marks objects between the two pointers.
Definition: gc.c:6316
void rb_gc(void)
Triggers a GC process.
Definition: gc.c:10627
void rb_gc_force_recycle(VALUE obj)
Asserts that the passed object is no longer needed.
Definition: gc.c:8938
void rb_gc_update_tbl_refs(st_table *ptr)
Updates references inside of tables.
Definition: gc.c:9879
void rb_mark_set(struct st_table *tbl)
Identical to rb_mark_hash(), except it marks only keys of the table and leave their associated values...
Definition: gc.c:6422
VALUE rb_define_finalizer(VALUE obj, VALUE block)
Assigns a finaliser for an object.
Definition: gc.c:4201
void rb_gc_copy_finalizer(VALUE dst, VALUE src)
Copy&paste an object's finaliser to another.
Definition: gc.c:4209
void rb_gc_adjust_memory_usage(ssize_t diff)
Informs that there are external memory usages.
Definition: gc.c:12381
size_t rb_gc_count(void)
Identical to rb_gc_stat(), with "count" parameter.
Definition: gc.c:10659
VALUE rb_hash_size(VALUE hash)
Identical to RHASH_SIZE(), except it returns the size in Ruby's integer instead of C's.
Definition: hash.c:2980
void rb_hash_bulk_insert(long argc, const VALUE *argv, VALUE hash)
Inserts a list of key-value pairs into a hash table at once.
Definition: hash.c:4758
void rb_hash_foreach(VALUE hash, int(*func)(VALUE key, VALUE val, VALUE arg), VALUE arg)
Iterates over a hash.
VALUE rb_check_hash_type(VALUE obj)
Try converting an object to its hash representation using its to_hash method, if any.
Definition: hash.c:1902
void rb_st_foreach_safe(struct st_table *st, st_foreach_callback_func *func, st_data_t arg)
Identical to rb_st_foreach(), except it raises exceptions when the callback function tampers the tabl...
VALUE rb_hash_lookup2(VALUE hash, VALUE key, VALUE def)
Identical to rb_hash_lookup(), except you can specify what to return on misshits.
Definition: hash.c:2101
int rb_path_check(const char *path)
This function is mysterious.
Definition: file.c:6309
VALUE rb_hash_freeze(VALUE obj)
Just another name of rb_obj_freeze.
Definition: hash.c:87
VALUE rb_hash_update_func(VALUE newkey, VALUE oldkey, VALUE value)
Type of callback functions to pass to rb_hash_update_by().
Definition: hash.h:269
VALUE rb_hash_delete(VALUE hash, VALUE key)
Deletes the passed key from the passed hash table, if any.
Definition: hash.c:2368
VALUE rb_hash_fetch(VALUE hash, VALUE key)
Identical to rb_hash_lookup(), except it yields the (implicitly) passed block instead of returning RU...
Definition: hash.c:2179
VALUE rb_hash_delete_if(VALUE hash)
Deletes each entry for which the block returns a truthy value.
Definition: hash.c:2530
VALUE rb_hash_update_by(VALUE hash1, VALUE hash2, rb_hash_update_func *func)
Destructively merges two hash tables into one.
Definition: hash.c:4015
VALUE rb_hash_aref(VALUE hash, VALUE key)
Queries the given key in the given hash table.
Definition: hash.c:2088
VALUE rb_hash_aset(VALUE hash, VALUE key, VALUE val)
Inserts or replaces ("upsert"s) the objects into the given hash table.
Definition: hash.c:2908
VALUE rb_env_clear(void)
Destructively removes every environment variables of the running process.
Definition: hash.c:5886
VALUE rb_hash_lookup(VALUE hash, VALUE key)
Identical to rb_hash_aref(), except it always returns RUBY_Qnil for misshits.
Definition: hash.c:2114
VALUE rb_hash_dup(VALUE hash)
Duplicates a hash.
Definition: hash.c:1591
VALUE rb_hash(VALUE obj)
Calculates a message authentication code of the passed object.
Definition: hash.c:227
VALUE rb_hash_clear(VALUE hash)
Swipes everything out of the passed hash table.
Definition: hash.c:2834
VALUE rb_hash_new(void)
Creates a new, empty hash object.
Definition: hash.c:1529
VALUE rb_io_printf(int argc, const VALUE *argv, VALUE io)
This is a rb_f_sprintf() + rb_io_write() combo.
Definition: io.c:8246
VALUE rb_io_gets(VALUE io)
Reads a "line" from the given IO.
Definition: io.c:3998
int rb_cloexec_pipe(int fildes[2])
Opens a pipe with closing on exec.
Definition: io.c:414
VALUE rb_rs
The record separator character for inputs, or the $/.
Definition: io.c:203
VALUE rb_io_print(int argc, const VALUE *argv, VALUE io)
Iterates over the passed array to apply rb_io_write() individually.
Definition: io.c:8371
VALUE rb_io_addstr(VALUE io, VALUE str)
Identical to rb_io_write(), except it always returns the passed IO.
Definition: io.c:2135
void rb_write_error(const char *str)
Writes the given error message to somewhere applicable.
Definition: io.c:8787
VALUE rb_io_ungetbyte(VALUE io, VALUE b)
Identical to rb_io_ungetc(), except it doesn't take the encoding of the passed IO into account.
Definition: io.c:4855
VALUE rb_io_getbyte(VALUE io)
Reads a byte from the given IO.
Definition: io.c:4763
VALUE rb_io_puts(int argc, const VALUE *argv, VALUE io)
Iterates over the passed array to apply rb_io_write() individually.
Definition: io.c:8601
int rb_cloexec_dup2(int oldfd, int newfd)
Identical to rb_cloexec_dup(), except you can specify the destination file descriptor.
Definition: io.c:361
VALUE rb_io_fdopen(int fd, int flags, const char *path)
Creates an IO instance whose backend is the given file descriptor.
Definition: io.c:8894
void rb_update_max_fd(int fd)
Informs the interpreter that the passed fd can be the max.
Definition: io.c:235
VALUE rb_io_write(VALUE io, VALUE str)
Writes the given string to the given IO.
Definition: io.c:2087
int rb_cloexec_open(const char *pathname, int flags, mode_t mode)
Opens a file that closes on exec.
Definition: io.c:315
VALUE rb_fs
The field separator character for inputs, or the $;.
Definition: string.c:552
VALUE rb_output_rs
The record separator character for outputs, or the $\.
Definition: io.c:204
VALUE rb_io_eof(VALUE io)
Queries if the passed IO is at the end of file.
Definition: io.c:2486
void rb_write_error2(const char *str, long len)
Identical to rb_write_error(), except it additionally takes the message's length.
Definition: io.c:8767
void rb_close_before_exec(int lowfd, int maxhint, VALUE noclose_fds)
Closes everything.
int rb_reserved_fd_p(int fd)
Queries if the given FD is reserved or not.
void rb_fd_fix_cloexec(int fd)
Sets or clears the close-on-exec flag of the passed file descriptor to the desired state.
Definition: io.c:285
VALUE rb_io_flush(VALUE io)
Flushes any buffered data within the passed IO to the underlying operating system.
Definition: io.c:2191
VALUE rb_io_ascii8bit_binmode(VALUE io)
Forces no conversions be applied to the passed IO.
Definition: io.c:5984
VALUE rb_io_binmode(VALUE io)
Sets the binmode.
Definition: io.c:5938
VALUE rb_io_ungetc(VALUE io, VALUE c)
"Unget"s a string.
Definition: io.c:4918
int rb_pipe(int *pipes)
This is an rb_cloexec_pipe() + rb_update_max_fd() combo.
Definition: io.c:6989
VALUE rb_gets(void)
Much like rb_io_gets(), but it reads from the mysterious ARGF object.
Definition: io.c:9724
int rb_cloexec_fcntl_dupfd(int fd, int minfd)
Duplicates a file descriptor with closing on exec.
Definition: io.c:448
VALUE rb_output_fs
The field separator character for outputs, or the $,.
Definition: io.c:202
VALUE rb_file_open_str(VALUE fname, const char *fmode)
Identical to rb_file_open(), except it takes the pathname as a Ruby's string instead of C's.
Definition: io.c:6872
int rb_cloexec_dup(int oldfd)
Identical to rb_cloexec_fcntl_dupfd(), except it implies minfd is 3.
Definition: io.c:354
VALUE rb_file_open(const char *fname, const char *fmode)
Opens a file located at the given path.
Definition: io.c:6879
VALUE rb_io_close(VALUE io)
Closes the IO.
Definition: io.c:5439
VALUE rb_default_rs
This is the default value of rb_rs, i.e.
Definition: io.c:205
void rb_provide(const char *feature)
Declares that the given feature is already provided by someone else.
Definition: load.c:671
VALUE rb_f_require(VALUE self, VALUE feature)
Identical to rb_require_string(), except it ignores the first argument for no reason.
Definition: load.c:939
VALUE rb_require_string(VALUE feature)
Finds and loads the given feature, if absent.
Definition: load.c:1257
int rb_feature_provided(const char *feature, const char **loading)
Identical to rb_provided(), except it additionally returns the "canonical" name of the loaded feature...
Definition: load.c:643
void rb_load_protect(VALUE path, int wrap, int *state)
Identical to rb_load(), except it avoids potential global escapes.
Definition: load.c:768
int rb_provided(const char *feature)
Queries if the given feature has already been loaded into the execution context.
Definition: load.c:610
void rb_load(VALUE path, int wrap)
Loads and executes the Ruby program in the given file.
Definition: load.c:760
void rb_num_zerodiv(void)
Just always raises an exception.
Definition: numeric.c:200
VALUE rb_num2fix(VALUE val)
Converts a numeric value into a Fixnum.
Definition: numeric.c:3382
VALUE rb_fix2str(VALUE val, int base)
Generates a place-value representation of the given Fixnum, with given radix.
Definition: numeric.c:3853
VALUE rb_int_positive_pow(long x, unsigned long y)
Raises the passed x to the power of y.
Definition: numeric.c:4492
VALUE rb_dbl_cmp(double lhs, double rhs)
Compares two doubles.
Definition: numeric.c:1661
VALUE rb_num_coerce_bit(VALUE lhs, VALUE rhs, ID op)
This one is optimised for bitwise operations, but the API is identical to rb_num_coerce_bin().
Definition: numeric.c:4923
VALUE rb_num_coerce_relop(VALUE lhs, VALUE rhs, ID op)
Identical to rb_num_coerce_cmp(), except for return values.
Definition: numeric.c:493
VALUE rb_num_coerce_cmp(VALUE lhs, VALUE rhs, ID op)
Identical to rb_num_coerce_bin(), except for return values.
Definition: numeric.c:478
VALUE rb_num_coerce_bin(VALUE lhs, VALUE rhs, ID op)
Coerced binary operation.
Definition: numeric.c:471
VALUE rb_obj_id(VALUE obj)
Finds or creates an integer primary key of the given object.
Definition: gc.c:4712
VALUE rb_memory_id(VALUE obj)
Identical to rb_obj_id(), except it hesitates from allocating a new instance of rb_cInteger.
Definition: gc.c:4679
VALUE rb_backref_get(void)
Queries the last match, or Regexp.last_match, or the $~.
Definition: vm.c:1583
VALUE rb_sym_all_symbols(void)
Collects every single bits of symbols that have ever interned in the entire history of the current pr...
Definition: symbol.c:1002
int rb_is_global_id(ID id)
Classifies the given ID, then sees if it is a global variable.
Definition: symbol.c:1035
void rb_lastline_set(VALUE str)
Updates $_.
Definition: vm.c:1601
int rb_is_instance_id(ID id)
Classifies the given ID, then sees if it is an instance variable.
Definition: symbol.c:1041
int rb_is_const_id(ID id)
Classifies the given ID, then sees if it is a constant.
Definition: symbol.c:1023
int rb_is_junk_id(ID)
Classifies the given ID, then sees if it is a junk ID.
Definition: symbol.c:1059
int rb_symname_p(const char *str)
Sees if the passed C string constructs a valid syntactic symbol.
Definition: symbol.c:197
VALUE rb_lastline_get(void)
Queries the last line, or the $_.
Definition: vm.c:1595
ID rb_id_attrset(ID id)
Calculates an ID of attribute writer.
Definition: symbol.c:113
int rb_is_class_id(ID id)
Classifies the given ID, then sees if it is a class variable.
Definition: symbol.c:1029
int rb_is_attrset_id(ID id)
Classifies the given ID, then sees if it is an attribute writer.
Definition: symbol.c:1047
int rb_is_local_id(ID id)
Classifies the given ID, then sees if it is a local variable.
Definition: symbol.c:1053
void rb_backref_set(VALUE md)
Updates $~.
Definition: vm.c:1589
VALUE rb_method_call_with_block(int argc, const VALUE *argv, VALUE recv, VALUE proc)
Identical to rb_proc_call(), except you can additionally pass a proc as a block.
Definition: proc.c:2491
int rb_obj_method_arity(VALUE obj, ID mid)
Identical to rb_mod_method_arity(), except it searches for singleton methods rather than instance met...
Definition: proc.c:2857
VALUE rb_proc_call(VALUE recv, VALUE args)
Evaluates the passed proc with the passed arguments.
Definition: proc.c:1000
VALUE rb_proc_call_with_block_kw(VALUE recv, int argc, const VALUE *argv, VALUE proc, int kw_splat)
Identical to rb_proc_call_with_block(), except you can specify how to handle the last element of the ...
Definition: proc.c:1012
VALUE rb_method_call_kw(int argc, const VALUE *argv, VALUE recv, int kw_splat)
Identical to rb_method_call(), except you can specify how to handle the last element of the given arr...
Definition: proc.c:2448
VALUE rb_obj_method(VALUE recv, VALUE mid)
Creates a method object.
Definition: proc.c:2040
VALUE rb_proc_lambda_p(VALUE recv)
Queries if the given object is a lambda.
Definition: proc.c:290
VALUE rb_block_proc(void)
Constructs a Proc object from implicitly passed components.
Definition: proc.c:845
VALUE rb_proc_call_with_block(VALUE recv, int argc, const VALUE *argv, VALUE proc)
Identical to rb_proc_call(), except you can additionally pass another proc object,...
Definition: proc.c:1024
VALUE rb_protect(VALUE(*func)(VALUE args), VALUE args, int *state)
Protects a function call from potential global escapes from the function.
int rb_mod_method_arity(VALUE mod, ID mid)
Queries the number of mandatory arguments of the method defined in the given module.
Definition: proc.c:2849
VALUE rb_proc_new(rb_block_call_func_t func, VALUE callback_arg)
This is an rb_iterate() + rb_block_proc() combo.
Definition: proc.c:3285
VALUE rb_method_call_with_block_kw(int argc, const VALUE *argv, VALUE recv, VALUE proc, int kw_splat)
Identical to rb_method_call_with_block(), except you can specify how to handle the last element of th...
Definition: proc.c:2478
VALUE rb_obj_is_method(VALUE recv)
Queries if the given object is a method.
Definition: proc.c:1632
VALUE rb_block_lambda(void)
Identical to rb_proc_new(), except it returns a lambda.
Definition: proc.c:864
VALUE rb_proc_call_kw(VALUE recv, VALUE args, int kw_splat)
Identical to rb_proc_call(), except you can specify how to handle the last element of the given array...
Definition: proc.c:985
VALUE rb_binding_new(void)
Snapshots the current execution context and turn it into an instance of rb_cBinding.
Definition: proc.c:382
int rb_proc_arity(VALUE recv)
Queries the number of mandatory arguments of the given Proc.
Definition: proc.c:1131
VALUE rb_method_call(int argc, const VALUE *argv, VALUE recv)
Evaluates the passed method with the passed arguments.
Definition: proc.c:2455
VALUE rb_obj_is_proc(VALUE recv)
Queries if the given object is a proc.
Definition: proc.c:172
int rb_proc_exec(const char *cmd)
Executes a shell command.
Definition: process.c:1906
VALUE rb_proc_times(VALUE _)
Gathers info about resources consumed by the current process.
VALUE rb_last_status_get(void)
Queries the "last status", or the $?.
Definition: process.c:616
rb_pid_t rb_waitpid(rb_pid_t pid, int *status, int flags)
Waits for a process, with releasing GVL.
Definition: process.c:1458
rb_pid_t rb_spawn_err(int argc, const VALUE *argv, char *errbuf, size_t buflen)
Identical to rb_spawn(), except you can additionally know the detailed situation in case of abnormal ...
Definition: process.c:4757
void rb_syswait(rb_pid_t pid)
This is a shorthand of rb_waitpid without status and flags.
Definition: process.c:4626
VALUE rb_f_exec(int argc, const VALUE *argv)
Replaces the current process by running the given external command.
Definition: process.c:3123
rb_pid_t rb_spawn(int argc, const VALUE *argv)
Identical to rb_f_exec(), except it spawns a child process instead of replacing the current one.
Definition: process.c:4763
void rb_last_status_set(int status, rb_pid_t pid)
Sets the "last status", or the $?.
Definition: process.c:680
VALUE rb_detach_process(rb_pid_t pid)
"Detaches" a subprocess.
Definition: process.c:1661
unsigned long rb_genrand_ulong_limited(unsigned long i)
Generates a random number whose upper limit is i.
Definition: random.c:1044
double rb_random_real(VALUE rnd)
Identical to rb_genrand_real(), except it generates using the passed RNG.
Definition: random.c:1116
unsigned int rb_random_int32(VALUE rnd)
Identical to rb_genrand_int32(), except it generates using the passed RNG.
Definition: random.c:1073
void rb_reset_random_seed(void)
Resets the RNG behind rb_genrand_int32()/rb_genrand_real().
Definition: random.c:1755
VALUE rb_random_bytes(VALUE rnd, long n)
Generates a String of random bytes.
Definition: random.c:1274
double rb_genrand_real(void)
Generates a double random number.
Definition: random.c:199
unsigned long rb_random_ulong_limited(VALUE rnd, unsigned long limit)
Identical to rb_genrand_ulong_limited(), except it generates using the passed RNG.
Definition: random.c:1176
unsigned int rb_genrand_int32(void)
Generates a 32 bit random number.
Definition: random.c:192
int rb_range_values(VALUE range, VALUE *begp, VALUE *endp, int *exclp)
Deconstructs a range into its components.
Definition: range.c:1490
VALUE rb_range_new(VALUE beg, VALUE end, int excl)
Creates a new Range.
Definition: range.c:67
VALUE rb_range_beg_len(VALUE range, long *begp, long *lenp, long len, int err)
Deconstructs a numerical range.
Definition: range.c:1578
VALUE rb_rational_raw(VALUE num, VALUE den)
Identical to rb_rational_new(), except it skips argument validations.
Definition: rational.c:1955
VALUE rb_rational_new(VALUE num, VALUE den)
Constructs a Rational, with reduction.
Definition: rational.c:1969
VALUE rb_Rational(VALUE num, VALUE den)
Converts various values into a Rational.
Definition: rational.c:1975
VALUE rb_rational_num(VALUE rat)
Queries the numerator of the passed Rational.
Definition: rational.c:1984
VALUE rb_flt_rationalize(VALUE flt)
Identical to rb_flt_rationalize_with_prec(), except it auto-detects appropriate precision depending o...
Definition: rational.c:2254
VALUE rb_flt_rationalize_with_prec(VALUE flt, VALUE prec)
Simplified approximation of a float.
Definition: rational.c:2238
VALUE rb_rational_den(VALUE rat)
Queries the denominator of the passed Rational.
Definition: rational.c:1990
int rb_reg_backref_number(VALUE match, VALUE backref)
Queries the index of the given named capture.
Definition: re.c:1224
int rb_reg_options(VALUE re)
Queries the options of the passed regular expression.
Definition: re.c:3855
VALUE rb_reg_last_match(VALUE md)
This just returns the argument, stringified.
Definition: re.c:1876
VALUE rb_reg_match(VALUE re, VALUE str)
This is the match operator.
Definition: re.c:3418
void rb_match_busy(VALUE md)
Asserts that the given MatchData is "occupied".
Definition: re.c:1430
VALUE rb_reg_nth_match(int n, VALUE md)
Queries the nth captured substring.
Definition: re.c:1851
VALUE rb_reg_match_post(VALUE md)
The portion of the original string after the given match.
Definition: re.c:1933
VALUE rb_reg_nth_defined(int n, VALUE md)
Identical to rb_reg_nth_match(), except it just returns Boolean.
Definition: re.c:1834
VALUE rb_reg_match_pre(VALUE md)
The portion of the original string before the given match.
Definition: re.c:1900
VALUE rb_reg_new_str(VALUE src, int opts)
Identical to rb_reg_new(), except it takes the expression in Ruby's string instead of C's.
Definition: re.c:3119
VALUE rb_reg_match_last(VALUE md)
The portion of the original string that captured at the very last.
Definition: re.c:1950
VALUE rb_reg_match2(VALUE re)
Identical to rb_reg_match(), except it matches against rb_lastline_get() (or, the $_).
Definition: re.c:3473
VALUE rb_reg_new(const char *src, long len, int opts)
Creates a new Regular expression.
Definition: re.c:3173
int rb_memcicmp(const void *s1, const void *s2, long n)
Identical to st_locale_insensitive_strcasecmp(), except it is timing safe and returns something diffe...
Definition: re.c:90
void ruby_default_signal(int sig)
Pretends as if there was no custom signal handler.
Definition: signal.c:407
const char * ruby_signal_name(int signo)
Queries the name of the signal.
Definition: signal.c:316
VALUE rb_f_kill(int argc, const VALUE *argv)
Sends a signal ("kills") to processes.
Definition: signal.c:423
void rb_str_free(VALUE str)
Destroys the given string for no reason.
Definition: string.c:1532
#define rb_hash_uint(h, i)
Just another name of st_hash_uint.
Definition: string.h:942
VALUE rb_str_new_shared(VALUE str)
Identical to rb_str_new_cstr(), except it takes a Ruby's string instead of C's.
Definition: string.c:1335
VALUE rb_str_plus(VALUE lhs, VALUE rhs)
Generates a new string, concatenating the former to the latter.
Definition: string.c:2171
#define rb_hash_end(h)
Just another name of st_hash_end.
Definition: string.h:945
#define rb_hash_uint32(h, i)
Just another name of st_hash_uint32.
Definition: string.h:939
VALUE rb_utf8_str_new(const char *ptr, long len)
Identical to rb_str_new(), except it generates a string of "UTF-8" encoding.
Definition: string.c:931
VALUE rb_str_append(VALUE dst, VALUE src)
Identical to rb_str_buf_append(), except it converts the right hand side before concatenating.
Definition: string.c:3259
VALUE rb_filesystem_str_new(const char *ptr, long len)
Identical to rb_str_new(), except it generates a string of "filesystem" encoding.
Definition: string.c:1248
VALUE rb_utf8_str_new_cstr(const char *ptr)
Identical to rb_str_new_cstr(), except it generates a string of "UTF-8" encoding.
Definition: string.c:971
VALUE rb_sym_to_s(VALUE sym)
This is an rb_sym2str() + rb_str_dup() combo.
Definition: string.c:11426
VALUE rb_str_times(VALUE str, VALUE num)
Repetition of a string.
Definition: string.c:2243
VALUE rb_external_str_new(const char *ptr, long len)
Identical to rb_str_new(), except it generates a string of "default external" encoding.
Definition: string.c:1224
VALUE rb_str_tmp_new(long len)
Allocates a "temporary" string.
Definition: string.c:1526
long rb_str_offset(VALUE str, long pos)
"Inverse" of rb_str_sublen().
Definition: string.c:2702
VALUE rb_str_succ(VALUE orig)
Searches for the "successor" of a string.
Definition: string.c:4714
int rb_str_hash_cmp(VALUE str1, VALUE str2)
Compares two strings.
Definition: string.c:3468
VALUE rb_str_subseq(VALUE str, long beg, long len)
Identical to rb_str_substr(), except the numbers are interpreted as byte offsets instead of character...
Definition: string.c:2760
VALUE rb_str_ellipsize(VALUE str, long len)
Shortens str and adds three dots, an ellipsis, if it is longer than len characters.
Definition: string.c:10719
st_index_t rb_memhash(const void *ptr, long len)
This is a universal hash function.
Definition: random.c:1720
void rb_str_shared_replace(VALUE dst, VALUE src)
Replaces the contents of the former with the latter.
Definition: string.c:1579
VALUE rb_str_new_static(const char *ptr, long len)
Identical to rb_str_new(), except it takes a C string literal.
Definition: string.c:1015
VALUE rb_str_buf_cat(VALUE, const char *, long)
Just another name of rb_str_cat.
size_t rb_str_capacity(VALUE str)
Queries the capacity of the given string.
Definition: string.c:827
VALUE rb_str_new_frozen(VALUE str)
Creates a frozen copy of the string, if necessary.
Definition: string.c:1341
VALUE rb_str_cat2(VALUE, const char *)
Just another name of rb_str_cat_cstr.
VALUE rb_str_dup(VALUE str)
Duplicates a string.
Definition: string.c:1794
void rb_str_modify(VALUE str)
Declares that the string is about to be modified.
Definition: string.c:2398
st_index_t rb_str_hash(VALUE str)
Calculates a hash value of a string.
Definition: string.c:3458
VALUE rb_str_cat(VALUE dst, const char *src, long srclen)
Destructively appends the passed contents to the string.
Definition: string.c:3102
VALUE rb_str_locktmp(VALUE str)
Obtains a "temporary lock" of the string.
long rb_str_strlen(VALUE str)
Counts the number of characters (not bytes) that are stored inside of the given string.
Definition: string.c:2109
VALUE rb_str_resurrect(VALUE str)
I guess there is no use case of this function in extension libraries, but this is a routine identical...
Definition: string.c:1800
VALUE rb_usascii_str_new(const char *ptr, long len)
Identical to rb_str_new(), except it generates a string of "US ASCII" encoding.
Definition: string.c:923
VALUE rb_str_replace(VALUE dst, VALUE src)
Replaces the contents of the former object with the stringised contents of the latter.
Definition: string.c:5917
VALUE rb_usascii_str_new_cstr(const char *ptr)
Identical to rb_str_new_cstr(), except it generates a string of "US ASCII" encoding.
Definition: string.c:963
VALUE rb_str_buf_cat2(VALUE, const char *)
Just another name of rb_str_cat_cstr.
char * rb_str_subpos(VALUE str, long beg, long *len)
Identical to rb_str_substr(), except it returns a C's string instead of Ruby's.
Definition: string.c:2783
rb_gvar_setter_t rb_str_setter
This is a rb_gvar_setter_t that refutes non-string assignments.
Definition: string.h:1146
VALUE rb_filesystem_str_new_cstr(const char *ptr)
Identical to rb_filesystem_str_new(), except it assumes the passed pointer is a pointer to a C string...
Definition: string.c:1254
VALUE rb_str_buf_append(VALUE dst, VALUE src)
Identical to rb_str_cat_cstr(), except it takes Ruby's string instead of C's.
Definition: string.c:3244
long rb_str_sublen(VALUE str, long pos)
Byte offset to character offset conversion.
Definition: string.c:2749
VALUE rb_str_equal(VALUE str1, VALUE str2)
Equality of two strings.
Definition: string.c:3570
void rb_str_set_len(VALUE str, long len)
Overwrites the length of the string.
Definition: string.c:2980
st_index_t rb_hash_start(st_index_t i)
Starts a series of hashing.
Definition: random.c:1714
VALUE rb_str_inspect(VALUE str)
Generates a "readable" version of the receiver.
Definition: string.c:6602
void rb_must_asciicompat(VALUE obj)
Asserts that the given string's encoding is (Ruby's definition of) ASCII compatible.
Definition: string.c:2450
VALUE rb_str_buf_new_cstr(const char *ptr)
This is a rb_str_buf_new() + rb_str_buf_cat() combo.
Definition: string.c:1514
int rb_str_cmp(VALUE lhs, VALUE rhs)
Compares two strings, as in strcmp(3).
Definition: string.c:3524
VALUE rb_str_concat(VALUE dst, VALUE src)
Identical to rb_str_append(), except it also accepts an integer as a codepoint.
Definition: string.c:3360
int rb_str_comparable(VALUE str1, VALUE str2)
Checks if two strings are comparable each other or not.
Definition: string.c:3499
VALUE rb_str_buf_cat_ascii(VALUE dst, const char *src)
Identical to rb_str_cat_cstr(), except it additionally assumes the source string be a NUL terminated ...
Definition: string.c:3220
VALUE rb_str_freeze(VALUE str)
This is the implementation of String#freeze.
Definition: string.c:2902
void rb_str_update(VALUE dst, long beg, long len, VALUE src)
Replaces some (or all) of the contents of the given string.
Definition: string.c:5218
VALUE rb_str_new(const char *ptr, long len)
Allocates an instance of rb_cString.
Definition: string.c:917
VALUE rb_str_scrub(VALUE str, VALUE repl)
"Cleanses" the string.
Definition: string.c:10777
VALUE rb_str_dup_frozen(VALUE)
Just another name of rb_str_new_frozen.
VALUE rb_str_new_with_class(VALUE obj, const char *ptr, long len)
Identical to rb_str_new(), except it takes the class of the allocating object.
Definition: string.c:1473
VALUE rb_locale_str_new_cstr(const char *ptr)
Identical to rb_locale_str_new(), except it assumes the passed pointer is a pointer to a C string.
Definition: string.c:1242
VALUE rb_check_string_type(VALUE obj)
Try converting an object to its stringised representation using its to_str method,...
Definition: string.c:2598
VALUE rb_str_substr(VALUE str, long beg, long len)
This is the implementation of two-argumented String#slice.
Definition: string.c:2870
VALUE rb_str_unlocktmp(VALUE str)
Releases a lock formerly obtained by rb_str_locktmp().
Definition: string.c:2963
VALUE rb_str_new_cstr(const char *ptr)
Identical to rb_str_new(), except it assumes the passed pointer is a pointer to a C string.
Definition: string.c:951
VALUE rb_str_resize(VALUE str, long len)
Overwrites the length of the string.
Definition: string.c:2997
VALUE rb_utf8_str_new_static(const char *ptr, long len)
Identical to rb_str_new_static(), except it generates a string of "UTF-8" encoding instead of "binary...
Definition: string.c:1027
void rb_str_modify_expand(VALUE str, long capa)
Identical to rb_str_modify(), except it additionally expands the capacity of the receiver.
Definition: string.c:2406
VALUE rb_str_dump(VALUE str)
"Inverse" of rb_eval_string().
Definition: string.c:6713
VALUE rb_locale_str_new(const char *ptr, long len)
Identical to rb_str_new(), except it generates a string of "locale" encoding.
Definition: string.c:1236
VALUE rb_str_buf_new(long capa)
Allocates a "string buffer".
Definition: string.c:1492
VALUE rb_external_str_new_cstr(const char *ptr)
Identical to rb_external_str_new(), except it assumes the passed pointer is a pointer to a C string.
Definition: string.c:1230
VALUE rb_str_length(VALUE)
Identical to rb_str_strlen(), except it returns the value in rb_cInteger.
Definition: string.c:2123
VALUE rb_str_cat_cstr(VALUE dst, const char *src)
Identical to rb_str_cat(), except it assumes the passed pointer is a pointer to a C string.
Definition: string.c:3112
VALUE rb_str_drop_bytes(VALUE str, long len)
Shrinks the given string for the given number of bytes.
Definition: string.c:5144
VALUE rb_str_split(VALUE str, const char *delim)
Divides the given string based on the given delimiter.
Definition: string.c:8781
VALUE rb_usascii_str_new_static(const char *ptr, long len)
Identical to rb_str_new_static(), except it generates a string of "US ASCII" encoding instead of "bin...
Definition: string.c:1021
VALUE rb_str_intern(VALUE str)
Identical to rb_to_symbol(), except it assumes the receiver being an instance of RString.
Definition: symbol.c:837
VALUE rb_obj_as_string(VALUE obj)
Try converting an object to its stringised representation using its to_s method, if any.
Definition: string.c:1643
VALUE rb_struct_define_without_accessor_under(VALUE outer, const char *class_name, VALUE super, rb_alloc_func_t alloc,...)
Identical to rb_struct_define_without_accessor(), except it defines the class under the specified nam...
Definition: struct.c:410
VALUE rb_struct_define_under(VALUE space, const char *name,...)
Identical to rb_struct_define(), except it defines the class under the specified namespace instead of...
Definition: struct.c:451
VALUE rb_struct_new(VALUE klass,...)
Creates an instance of the given struct.
Definition: struct.c:805
VALUE rb_struct_initialize(VALUE self, VALUE values)
Mass-assigns a struct's fields.
Definition: struct.c:732
VALUE rb_struct_define_without_accessor(const char *name, VALUE super, rb_alloc_func_t func,...)
Identical to rb_struct_define(), except it does not define accessor methods.
Definition: struct.c:423
VALUE rb_struct_define(const char *name,...)
Defines a struct class.
Definition: struct.c:436
VALUE rb_struct_alloc(VALUE klass, VALUE values)
Identical to rb_struct_new(), except it takes the field values as a Ruby array.
Definition: struct.c:799
VALUE rb_struct_alloc_noinit(VALUE klass)
Allocates an instance of the given class.
Definition: struct.c:353
VALUE rb_struct_s_members(VALUE klass)
Queries the list of the names of the fields of the given struct class.
Definition: struct.c:64
VALUE rb_struct_members(VALUE self)
Queries the list of the names of the fields of the class of the given struct object.
Definition: struct.c:78
VALUE rb_struct_getmember(VALUE self, ID key)
Identical to rb_struct_aref(), except it takes ID instead of VALUE.
Definition: struct.c:229
int rb_thread_interrupted(VALUE thval)
Checks if the thread's execution was recently interrupted.
Definition: thread.c:1399
VALUE rb_thread_local_aref(VALUE thread, ID key)
This badly named function reads from a Fiber local storage.
Definition: thread.c:3314
VALUE rb_mutex_new(void)
Creates a mutex.
Definition: thread_sync.c:172
int rb_thread_fd_writable(int fd)
Identical to rb_thread_wait_fd(), except it blocks the current thread until the given file descriptor...
Definition: io.c:1397
VALUE rb_thread_kill(VALUE thread)
Terminates the given thread.
Definition: thread.c:2507
VALUE rb_thread_main(void)
Obtains the "main" thread.
Definition: thread.c:2746
VALUE rb_exec_recursive(VALUE(*f)(VALUE g, VALUE h, int r), VALUE g, VALUE h)
"Recursion" API entry point.
void rb_thread_sleep_forever(void)
Blocks indefinitely.
Definition: thread.c:1328
void rb_thread_fd_close(int fd)
Notifies a closing of a file descriptor to other threads.
Definition: thread.c:2447
void rb_thread_wait_for(struct timeval time)
Identical to rb_thread_sleep(), except it takes struct timeval instead.
Definition: thread.c:1367
VALUE rb_mutex_trylock(VALUE mutex)
Attempts to lock the mutex, without waiting for other threads to unlock it.
Definition: thread_sync.c:233
VALUE rb_mutex_locked_p(VALUE mutex)
Queries if there are any threads that holds the lock.
Definition: thread_sync.c:184
VALUE rb_mutex_synchronize(VALUE mutex, VALUE(*func)(VALUE arg), VALUE arg)
Obtains the lock, runs the passed function, and releases the lock when it completes.
Definition: thread_sync.c:597
VALUE rb_thread_stop(void)
Stops the current thread.
Definition: thread.c:2658
VALUE rb_mutex_sleep(VALUE self, VALUE timeout)
Releases the lock held in the mutex and waits for the period of time; reacquires the lock on wakeup.
Definition: thread_sync.c:530
VALUE rb_exec_recursive_paired(VALUE(*f)(VALUE g, VALUE h, int r), VALUE g, VALUE p, VALUE h)
Identical to rb_exec_recursive(), except it checks for the recursion on the ordered pair of { g,...
void rb_unblock_function_t(void *)
This is the type of UBFs.
Definition: thread.h:337
void rb_thread_atfork_before_exec(void)
:FIXME: situation of this function is unclear.
Definition: thread.c:4620
VALUE rb_thread_create(VALUE(*f)(void *g), void *g)
Creates a Ruby thread that is backended by a C function.
void rb_thread_check_ints(void)
Checks for interrupts.
Definition: thread.c:1382
VALUE rb_thread_run(VALUE thread)
This is a rb_thread_wakeup() + rb_thread_schedule() combo.
Definition: thread.c:2649
VALUE rb_thread_wakeup(VALUE thread)
Marks a given thread as eligible for scheduling.
Definition: thread.c:2602
VALUE rb_mutex_unlock(VALUE mutex)
Releases the mutex.
Definition: thread_sync.c:468
VALUE rb_exec_recursive_paired_outer(VALUE(*f)(VALUE g, VALUE h, int r), VALUE g, VALUE p, VALUE h)
Identical to rb_exec_recursive_outer(), except it checks for the recursion on the ordered pair of { g...
void rb_thread_sleep_deadly(void)
Identical to rb_thread_sleep_forever(), except the thread calling this function is considered "dead" ...
Definition: thread.c:1335
void rb_thread_atfork(void)
A pthread_atfork(3posix)-like API.
Definition: thread.c:4615
VALUE rb_thread_current(void)
Obtains the "current" thread.
Definition: thread.c:2725
int rb_thread_alone(void)
Checks if the thread this function is running is the only thread that is currently alive.
Definition: thread.c:3586
int rb_thread_wait_fd(int fd)
Blocks the current thread until the given file descriptor is ready to be read.
Definition: io.c:1391
VALUE rb_thread_local_aset(VALUE thread, ID key, VALUE val)
This badly named function writes to a Fiber local storage.
Definition: thread.c:3462
void rb_thread_schedule(void)
Tries to switch to another thread.
Definition: thread.c:1430
VALUE rb_thread_wakeup_alive(VALUE thread)
Identical to rb_thread_wakeup(), except it doesn't raise on an already killed thread.
Definition: thread.c:2611
VALUE rb_mutex_lock(VALUE mutex)
Attempts to lock the mutex.
Definition: thread_sync.c:395
void rb_thread_sleep(int sec)
Blocks for the given period of time.
Definition: thread.c:1405
VALUE rb_time_nano_new(time_t sec, long nsec)
Identical to rb_time_new(), except it accepts the time in nanoseconds resolution.
Definition: time.c:2482
void rb_timespec_now(struct timespec *ts)
Fills the current time into the given struct.
Definition: time.c:1896
VALUE rb_time_timespec_new(const struct timespec *ts, int offset)
Creates an instance of rb_cTime, with given time and offset.
Definition: time.c:2488
struct timespec rb_time_timespec(VALUE time)
Identical to rb_time_timeval(), except for return type.
Definition: time.c:2651
VALUE rb_time_new(time_t sec, long usec)
Creates an instance of rb_cTime with the given time and the local timezone.
Definition: time.c:2474
struct timeval rb_time_timeval(VALUE time)
Converts an instance of rb_cTime to a struct timeval that represents the identical point of time.
Definition: time.c:2634
struct timeval rb_time_interval(VALUE num)
Creates a "time interval".
Definition: time.c:2628
VALUE rb_time_num_new(VALUE timev, VALUE off)
Identical to rb_time_timespec_new(), except it takes Ruby values instead of C structs.
Definition: time.c:2511
VALUE rb_time_utc_offset(VALUE time)
Queries the offset, in seconds between the time zone of the time and the UTC.
Definition: time.c:4694
struct timespec rb_time_timespec_interval(VALUE num)
Identical to rb_time_interval(), except for return type.
Definition: time.c:2665
VALUE rb_mod_remove_cvar(VALUE mod, VALUE name)
Resembles Module#remove_class_variable.
Definition: variable.c:3859
VALUE rb_obj_instance_variables(VALUE obj)
Resembles Object#instance_variables.
Definition: variable.c:1903
VALUE rb_f_untrace_var(int argc, const VALUE *argv)
Deletes the passed tracer from the passed global variable, or if omitted, deletes everything.
Definition: variable.c:674
VALUE rb_const_get(VALUE space, ID name)
Identical to rb_const_defined(), except it returns the actual defined value.
Definition: variable.c:2850
VALUE rb_const_list(void *)
This is another mysterious API that comes with no documents at all.
Definition: variable.c:3070
VALUE rb_path2class(const char *path)
Resolves a Q::W::E::R-style path string to the actual class it points.
Definition: variable.c:305
VALUE rb_autoload_p(VALUE space, ID name)
Queries if an autoload is defined at a point.
Definition: variable.c:2723
VALUE rb_attr_get(VALUE obj, ID name)
Identical to rb_ivar_get()
Definition: variable.c:1310
void rb_set_class_path(VALUE klass, VALUE space, const char *name)
Names a class.
Definition: variable.c:252
VALUE rb_ivar_set(VALUE obj, ID name, VALUE val)
Identical to rb_iv_set(), except it accepts the name as an ID instead of a C string.
Definition: variable.c:1592
VALUE rb_mod_remove_const(VALUE space, VALUE name)
Resembles Module#remove_const.
Definition: variable.c:2942
VALUE rb_class_path_cached(VALUE mod)
Just another name of rb_mod_name.
Definition: variable.c:198
VALUE rb_f_trace_var(int argc, const VALUE *argv)
Traces a global variable.
Definition: variable.c:628
void rb_cvar_set(VALUE klass, ID name, VALUE val)
Assigns a value to a class variable.
Definition: variable.c:3624
VALUE rb_cvar_get(VALUE klass, ID name)
Obtains a value from a class variable.
Definition: variable.c:3693
VALUE rb_mod_constants(int argc, const VALUE *argv, VALUE recv)
Resembles Module#constants.
Definition: variable.c:3102
VALUE rb_path_to_class(VALUE path)
Identical to rb_path2class(), except it accepts the path as Ruby's string instead of C's.
Definition: variable.c:260
VALUE rb_ivar_get(VALUE obj, ID name)
Identical to rb_iv_get(), except it accepts the name as an ID instead of a C string.
Definition: variable.c:1302
void rb_ivar_foreach(VALUE obj, int(*func)(ID name, VALUE val, st_data_t arg), st_data_t arg)
Iterates over an object's instance variables.
void rb_const_set(VALUE space, ID name, VALUE val)
Names a constant.
Definition: variable.c:3303
VALUE rb_autoload_load(VALUE space, ID name)
Kicks the autoload procedure as if it was "touched".
Definition: variable.c:2685
VALUE rb_mod_name(VALUE mod)
Queries the name of a module.
Definition: variable.c:138
VALUE rb_class_name(VALUE obj)
Queries the name of the given object's class.
Definition: variable.c:311
VALUE rb_const_get_at(VALUE space, ID name)
Identical to rb_const_defined_at(), except it returns the actual defined value.
Definition: variable.c:2856
void rb_set_class_path_string(VALUE klass, VALUE space, VALUE name)
Identical to rb_set_class_path(), except it accepts the name as Ruby's string instead of C's.
Definition: variable.c:232
void rb_alias_variable(ID dst, ID src)
Aliases a global variable.
Definition: variable.c:860
void rb_define_class_variable(VALUE, const char *, VALUE)
Just another name of rb_cv_set.
Definition: variable.c:3733
VALUE rb_obj_remove_instance_variable(VALUE obj, VALUE name)
Resembles Object#remove_instance_variable.
Definition: variable.c:1958
void * rb_mod_const_of(VALUE, void *)
This is a variant of rb_mod_const_at().
Definition: variable.c:3048
st_index_t rb_ivar_count(VALUE obj)
Number of instance variables defined on an object.
Definition: variable.c:1835
void * rb_mod_const_at(VALUE, void *)
This API is mysterious.
Definition: variable.c:3031
VALUE rb_const_remove(VALUE space, ID name)
Identical to rb_mod_remove_const(), except it takes the name as ID instead of VALUE.
Definition: variable.c:2953
VALUE rb_const_get_from(VALUE space, ID name)
Identical to rb_const_defined_at(), except it returns the actual defined value.
Definition: variable.c:2844
VALUE rb_ivar_defined(VALUE obj, ID name)
Queries if the instance variable is defined at the object.
Definition: variable.c:1609
VALUE rb_cv_get(VALUE klass, const char *name)
Identical to rb_cvar_get(), except it accepts C's string instead of ID.
Definition: variable.c:3726
int rb_const_defined_at(VALUE space, ID name)
Identical to rb_const_defined(), except it doesn't look for parent classes.
Definition: variable.c:3164
void rb_cv_set(VALUE klass, const char *name, VALUE val)
Identical to rb_cvar_set(), except it accepts C's string instead of ID.
Definition: variable.c:3719
VALUE rb_mod_class_variables(int argc, const VALUE *argv, VALUE recv)
Resembles Module#class_variables.
Definition: variable.c:3824
VALUE rb_f_global_variables(void)
Queries the list of global variables.
Definition: variable.c:828
VALUE rb_cvar_defined(VALUE klass, ID name)
Queries if the given class has the given class variable.
Definition: variable.c:3700
VALUE rb_class_path(VALUE mod)
Identical to rb_mod_name(), except it returns #<Class: ...> style inspection for anonymous modules.
Definition: variable.c:189
int rb_const_defined_from(VALUE space, ID name)
Identical to rb_const_defined(), except it returns false for private constants.
Definition: variable.c:3152
int rb_const_defined(VALUE space, ID name)
Queries if the constant is defined at the namespace.
Definition: variable.c:3158
void rb_free_generic_ivar(VALUE obj)
Frees the list of instance variables.
Definition: variable.c:1172
int rb_respond_to(VALUE obj, ID mid)
Queries if the object responds to the method.
Definition: vm_method.c:2799
VALUE(* rb_alloc_func_t)(VALUE klass)
This is the type of functions that ruby calls when trying to allocate an object.
Definition: vm.h:216
void rb_undef_alloc_func(VALUE klass)
Deletes the allocator function of a class.
Definition: vm_method.c:1151
const char * rb_sourcefile(void)
Resembles __FILE__.
Definition: vm.c:1609
void rb_alias(VALUE klass, ID dst, ID src)
Resembles alias.
Definition: vm_method.c:2134
int rb_method_basic_definition_p(VALUE klass, ID mid)
Well... Let us hesitate from describing what a "basic definition" is.
Definition: vm_method.c:2677
void rb_attr(VALUE klass, ID name, int need_reader, int need_writer, int honour_visibility)
This function resembles now-deprecated Module#attr.
Definition: vm_method.c:1714
void rb_remove_method(VALUE klass, const char *name)
Removes a method.
Definition: vm_method.c:1563
VALUE rb_check_funcall(VALUE recv, ID mid, int argc, const VALUE *argv)
Identical to rb_funcallv(), except it returns RUBY_Qundef instead of raising rb_eNoMethodError.
Definition: vm_eval.c:664
int rb_frame_method_id_and_class(ID *idp, VALUE *klassp)
Resembles __method__.
Definition: vm.c:2578
rb_alloc_func_t rb_get_alloc_func(VALUE klass)
Queries the allocator function of a class.
Definition: vm_method.c:1157
VALUE rb_check_funcall_kw(VALUE recv, ID mid, int argc, const VALUE *argv, int kw_splat)
Identical to rb_check_funcall(), except you can specify how to handle the last element of the given a...
Definition: vm_eval.c:658
VALUE rb_mod_module_eval(int argc, const VALUE *argv, VALUE mod)
Identical to rb_obj_instance_eval(), except it evaluates within the context of module.
Definition: vm_eval.c:2138
void rb_remove_method_id(VALUE klass, ID mid)
Identical to rb_remove_method(), except it accepts the method name as ID.
Definition: vm_method.c:1557
VALUE rb_mod_module_exec(int argc, const VALUE *argv, VALUE mod)
Identical to rb_obj_instance_exec(), except it evaluates within the context of module.
Definition: vm_eval.c:2172
void rb_define_alloc_func(VALUE klass, rb_alloc_func_t func)
Sets the allocator function of a class.
VALUE rb_obj_instance_exec(int argc, const VALUE *argv, VALUE recv)
Executes the given block within the context of the receiver.
Definition: vm_eval.c:2099
VALUE rb_eval_cmd_kw(VALUE cmd, VALUE arg, int kw_splat)
This API is practically a variant of rb_proc_call_kw() now.
Definition: vm_eval.c:1900
VALUE rb_f_notimplement(int argc, const VALUE *argv, VALUE obj, VALUE marker)
Raises rb_eNotImpError.
Definition: vm_method.c:360
VALUE rb_apply(VALUE recv, ID mid, VALUE args)
Identical to rb_funcallv(), except it takes Ruby's array instead of C's.
Definition: vm_eval.c:1077
VALUE rb_make_backtrace(void)
Creates the good old fashioned array-of-strings style backtrace info.
int rb_method_boundp(VALUE klass, ID id, int ex)
Queries if the klass has this method.
Definition: vm_method.c:1675
void rb_backtrace(void)
Prints the backtrace out to the standard error.
VALUE rb_obj_instance_eval(int argc, const VALUE *argv, VALUE recv)
Evaluates a string containing Ruby source code, or the given block, within the context of the receive...
Definition: vm_eval.c:2069
int rb_sourceline(void)
Resembles __LINE__.
Definition: vm.c:1623
int rb_obj_respond_to(VALUE obj, ID mid, int private_p)
Identical to rb_respond_to(), except it additionally takes the visibility parameter.
Definition: vm_method.c:2783
ID rb_intern2(const char *name, long len)
Identical to rb_intern(), except it additionally takes the length of the string.
Definition: symbol.c:775
VALUE rb_check_symbol(volatile VALUE *namep)
Identical to rb_check_id(), except it returns an instance of rb_cSymbol instead.
Definition: symbol.c:1110
VALUE rb_id2sym(ID id)
Allocates an instance of rb_cSymbol that has the given id.
Definition: symbol.c:916
ID rb_check_id(volatile VALUE *namep)
Detects if the given name is already interned or not.
Definition: symbol.c:1077
ID rb_intern(const char *name)
Finds or creates a symbol of the given name.
Definition: symbol.c:782
VALUE rb_sym2str(VALUE id)
Identical to rb_id2str(), except it takes an instance of rb_cSymbol rather than an ID.
Definition: symbol.c:935
VALUE rb_to_symbol(VALUE name)
Identical to rb_intern_str(), except it generates a dynamic symbol if necessary.
Definition: string.c:11770
ID rb_sym2id(VALUE obj)
Converts an instance of rb_cSymbol into an ID.
Definition: symbol.c:882
ID rb_to_id(VALUE str)
Identical to rb_intern(), except it takes an instance of rb_cString.
Definition: string.c:11760
const char * rb_id2name(ID id)
Retrieves the name mapped to the given id.
Definition: symbol.c:952
ID rb_intern_str(VALUE str)
Identical to rb_intern(), except it takes an instance of rb_cString.
Definition: symbol.c:788
VALUE rb_id2str(ID id)
Identical to rb_id2name(), except it returns a Ruby's String instead of C's.
Definition: symbol.c:946
rb_gvar_setter_t rb_gvar_var_setter
Definition: variable.h:119
rb_gvar_marker_t rb_gvar_var_marker
Definition: variable.h:128
void rb_define_global_const(const char *name, VALUE val)
Identical to rb_define_const(), except it defines that of "global", i.e.
Definition: variable.c:3409
VALUE rb_gv_get(const char *name)
Obtains a global variable.
Definition: variable.c:786
void rb_define_variable(const char *name, VALUE *var)
"Shares" a global variable between Ruby and C.
Definition: variable.c:599
void rb_gvar_marker_t(VALUE *var)
Type that represents a global variable marker function.
Definition: variable.h:53
void rb_deprecate_constant(VALUE mod, const char *name)
Asserts that the given constant is deprecated.
Definition: variable.c:3457
void rb_gvar_setter_t(VALUE val, ID id, VALUE *data)
Type that represents a global variable setter function.
Definition: variable.h:46
rb_gvar_setter_t rb_gvar_val_setter
This is the setter function that backs global variables defined from a ruby script.
Definition: variable.h:94
rb_gvar_marker_t rb_gvar_undef_marker
Definition: variable.h:80
void rb_define_readonly_variable(const char *name, const VALUE *var)
Identical to rb_define_variable(), except it does not allow Ruby programs to assign values to such gl...
Definition: variable.c:605
rb_gvar_setter_t rb_gvar_readonly_setter
This function just raises rb_eNameError.
Definition: variable.h:135
rb_gvar_getter_t rb_gvar_undef_getter
Definition: variable.h:62
VALUE rb_gv_set(const char *name, VALUE val)
Assigns to a global variable.
Definition: variable.c:772
rb_gvar_marker_t rb_gvar_val_marker
This is the setter function that backs global variables defined from a ruby script.
Definition: variable.h:101
void rb_define_virtual_variable(const char *name, rb_gvar_getter_t *getter, rb_gvar_setter_t *setter)
Defines a global variable that is purely function-backended.
Definition: variable.c:611
void rb_define_const(VALUE klass, const char *name, VALUE val)
Defines a Ruby level constant under a namespace.
Definition: variable.c:3397
VALUE rb_gvar_getter_t(ID id, VALUE *data)
Type that represents a global variable getter function.
Definition: variable.h:37
VALUE rb_iv_get(VALUE obj, const char *name)
Obtains an instance variable.
Definition: variable.c:3881
rb_gvar_setter_t rb_gvar_undef_setter
Definition: variable.h:71
rb_gvar_getter_t rb_gvar_val_getter
This is the getter function that backs global variables defined from a ruby script.
Definition: variable.h:87
VALUE rb_iv_set(VALUE obj, const char *name, VALUE val)
Assigns to an instance variable.
Definition: variable.c:3892
void rb_define_hooked_variable(const char *name, VALUE *var, rb_gvar_getter_t *getter, rb_gvar_setter_t *setter)
Identical to rb_define_virtual_variable(), but can also specify a storage.
Definition: variable.c:580
rb_gvar_getter_t rb_gvar_var_getter
Definition: variable.h:110
VALUE rb_io_get_io(VALUE io)
Identical to rb_io_check_io(), except it raises exceptions on conversion failures.
Definition: io.c:802
const signed char ruby_digit36_to_number_table[]
Character to number mapping like ‘'a’->10,'b'->11` etc.
Definition: util.c:76
#define strtod(s, e)
Just another name of ruby_strtod.
Definition: util.h:212
const char ruby_hexdigits[]
Characters that Ruby accepts as hexadecimal digits.
Definition: util.c:34
unsigned long ruby_scan_digits(const char *str, ssize_t len, int base, size_t *retlen, int *overflow)
Scans the passed string, assuming the string is a textual representation of an integer.
Definition: util.c:98
#define strdup(s)
Just another name of ruby_strdup.
Definition: util.h:176
const int ruby_api_version[3]
API versions, in { major, minor, teeny } order.
Definition: version.c:27
void ruby_vm_at_exit(void(*func)(ruby_vm_t *))
ruby_vm_at_exit registers a function func to be invoked when a VM passed away.
Definition: vm.c:699
int ruby_vm_destruct(ruby_vm_t *vm)
Destructs the passed VM.
Definition: vm.c:2778
unsigned long rb_num2uint(VALUE num)
Converts an instance of rb_cNumeric into C's unsigned long.
Definition: numeric.c:3296
long rb_fix2int(VALUE num)
Identical to rb_num2int().
Definition: numeric.c:3290
static int rb_num2int_inline(VALUE x)
Converts an instance of rb_cNumeric into C's int.
Definition: int.h:158
long rb_num2int(VALUE num)
Converts an instance of rb_cNumeric into C's long.
Definition: numeric.c:3284
unsigned long rb_fix2uint(VALUE num)
Identical to rb_num2uint().
Definition: numeric.c:3302
VALUE rb_str_format(int argc, const VALUE *argv, VALUE fmt)
Formats a string.
Definition: sprintf.c:214
VALUE rb_f_sprintf(int argc, const VALUE *argv)
Identical to rb_str_format(), except how the arguments are arranged.
Definition: sprintf.c:208
VALUE rb_sprintf(const char *fmt,...)
Ruby's extended sprintf(3).
Definition: sprintf.c:1201
VALUE rb_str_vcatf(VALUE dst, const char *fmt, va_list ap)
Identical to rb_str_catf(), except it takes a va_list.
Definition: sprintf.c:1214
VALUE rb_vsprintf(const char *fmt, va_list ap)
Identical to rb_sprintf(), except it takes a va_list.
Definition: sprintf.c:1195
VALUE rb_str_catf(VALUE dst, const char *fmt,...)
Identical to rb_sprintf(), except it renders the output to the specified object rather than creating ...
Definition: sprintf.c:1241
LONG_LONG rb_num2ll(VALUE num)
Converts an instance of rb_cNumeric into C's long long.
unsigned LONG_LONG rb_num2ull(VALUE num)
Converts an instance of rb_cNumeric into C's unsigned long long.
VALUE rb_ull2inum(unsigned LONG_LONG num)
Converts a C's unsigned long long into an instance of rb_cInteger.
VALUE rb_ll2inum(LONG_LONG num)
Converts a C's long long into an instance of rb_cInteger.
static LONG_LONG rb_num2ll_inline(VALUE x)
Converts an instance of rb_cNumeric into C's long long.
Definition: long_long.h:110
VALUE rb_int2inum(intptr_t i)
Converts a C's intptr_t into an instance of rb_cInteger.
Definition: bignum.c:3237
VALUE rb_uint2big(uintptr_t i)
Converts a C's intptr_t into an instance of rb_cInteger.
Definition: bignum.c:3187
VALUE rb_int2big(intptr_t i)
Converts a C's intptr_t into an instance of rb_cInteger.
Definition: bignum.c:3209
VALUE rb_uint2inum(uintptr_t i)
Converts a C's uintptr_t into an instance of rb_cInteger.
Definition: bignum.c:3230
VALUE rb_catch_obj(VALUE tag, rb_block_call_func_t func, VALUE data)
Identical to rb_catch(), except it catches arbitrary Ruby objects.
Definition: vm_eval.c:2401
VALUE rb_each(VALUE obj)
This is a shorthand of calling obj.each.
Definition: vm_eval.c:1657
VALUE rb_block_call(VALUE obj, ID mid, int argc, const VALUE *argv, rb_block_call_func_t proc, VALUE data2)
Identical to rb_funcallv(), except it additionally passes a function as a block.
Definition: vm_eval.c:1595
VALUE rb_yield_values(int n,...)
Identical to rb_yield(), except it takes variadic number of parameters and pass them to the block.
Definition: vm_eval.c:1369
VALUE rb_yield_splat(VALUE ary)
Identical to rb_yield_values(), except it splats an array to generate the list of parameters.
Definition: vm_eval.c:1403
void rb_throw(const char *tag, VALUE val)
Transfers control to the end of the active catch block waiting for tag.
Definition: vm_eval.c:2289
VALUE rb_yield_values2(int n, const VALUE *argv)
Identical to rb_yield_values(), except it takes the parameters as a C array instead of variadic argum...
Definition: vm_eval.c:1391
VALUE rb_yield(VALUE val)
Yields the block.
Definition: vm_eval.c:1357
VALUE rb_yield_values_kw(int n, const VALUE *argv, int kw_splat)
Identical to rb_yield_values2(), except you can specify how to handle the last element of the given a...
Definition: vm_eval.c:1397
VALUE rb_yield_block(RB_BLOCK_CALL_FUNC_ARGLIST(yielded_arg, callback_arg))
Pass a passed block.
void rb_throw_obj(VALUE tag, VALUE val)
Identical to rb_throw(), except it allows arbitrary Ruby object to become a tag.
Definition: vm_eval.c:2264
VALUE rb_block_call_func(RB_BLOCK_CALL_FUNC_ARGLIST(yielded_arg, callback_arg))
This is the type of a function that the interpreter expect for C-backended blocks.
Definition: iterator.h:83
VALUE rb_iterate(VALUE(*func1)(VALUE), VALUE data1, rb_block_call_func_t proc, VALUE data2)
Old way to iterate a block.
Definition: vm_eval.c:1569
VALUE rb_catch(const char *tag, rb_block_call_func_t func, VALUE data)
Executes the passed block and catches values thrown from inside of it.
Definition: vm_eval.c:2359
VALUE rb_block_call_kw(VALUE obj, ID mid, int argc, const VALUE *argv, rb_block_call_func_t proc, VALUE data2, int kw_splat)
Identical to rb_funcallv_kw(), except it additionally passes a function as a block.
Definition: vm_eval.c:1602
VALUE rb_yield_splat_kw(VALUE ary, int kw_splat)
Identical to rb_yield_splat(), except you can specify how to handle the last element of the given arr...
Definition: vm_eval.c:1416
int rb_fd_select(int nfds, rb_fdset_t *rfds, rb_fdset_t *wfds, rb_fdset_t *efds, struct timeval *timeout)
Waits for multiple file descriptors at once.
int rb_fd_isset(int fd, const rb_fdset_t *f)
Queries if the given FD is in the given set.
void rb_fd_clr(int fd, rb_fdset_t *f)
Releases a specific FD from the given fdset.
void rb_fd_copy(rb_fdset_t *dst, const fd_set *src, int max)
Destructively overwrites an fdset with another.
void rb_fd_dup(rb_fdset_t *dst, const rb_fdset_t *src)
Identical to rb_fd_copy(), except it copies unlimited number of file descriptors.
void rb_fd_term(rb_fdset_t *f)
Destroys the rb_fdset_t, releasing any memory and resources it used.
void rb_fd_zero(rb_fdset_t *f)
Wipes out the current set of FDs.
static long rb_num2long_inline(VALUE x)
Converts an instance of rb_cNumeric into C's long.
Definition: long.h:267
static unsigned long rb_num2ulong_inline(VALUE x)
Converts an instance of rb_cNumeric into C's unsigned long.
Definition: long.h:293
static int rb_long2int_inline(long n)
Checks if int can hold the given integer.
Definition: long.h:135
static VALUE rb_ulong2num_inline(unsigned long v)
Converts a C's unsigned long into an instance of rb_cInteger.
Definition: long.h:323
static long rb_fix2long(VALUE x)
Converts a Fixnum into C's long.
Definition: long.h:231
void rb_out_of_int(SIGNED_VALUE num)
This is an utility function to raise an rb_eRangeError.
Definition: numeric.c:3211
long rb_num2long(VALUE num)
Converts an instance of rb_cNumeric into C's long.
Definition: numeric.c:3136
unsigned long rb_num2ulong(VALUE num)
Converts an instance of rb_cNumeric into C's unsigned long.
Definition: numeric.c:3205
static VALUE rb_long2num_inline(long v)
Converts a C's long into an instance of rb_cInteger.
Definition: long.h:308
static unsigned long rb_fix2ulong(VALUE x)
Converts a Fixnum into C's unsigned long.
Definition: long.h:252
VALUE rb_marshal_dump(VALUE obj, VALUE port)
Serialises the given object and all its referring objects, to write them down to the passed port.
Definition: marshal.c:2423
void rb_marshal_define_compat(VALUE newclass, VALUE oldclass, VALUE(*dumper)(VALUE), VALUE(*loader)(VALUE, VALUE))
Marshal format compatibility layer.
Definition: marshal.c:148
VALUE rb_marshal_load(VALUE port)
Deserialises a previous output of rb_marshal_dump() into a network of objects.
Definition: marshal.c:2429
static void * rb_alloc_tmp_buffer2(volatile VALUE *store, long count, size_t elsize)
This is an implementation detail of RB_ALLOCV_N().
Definition: memory.h:640
static int rb_mul_size_overflow(size_t a, size_t b, size_t max, size_t *c)
Definition: memory.h:525
VALUE type(ANYARGS)
ANYARGS-ed function type.
Definition: cxxanyargs.hpp:56
VALUE rb_newobj(void)
This is the implementation detail of RB_NEWOBJ.
Definition: gc.c:2826
void rb_copy_generic_ivar(VALUE clone, VALUE obj)
Copies the list of instance variables.
Definition: variable.c:1736
VALUE rb_newobj_of(VALUE klass, VALUE flags)
This is the implementation detail of RB_NEWOBJ_OF.
Definition: gc.c:2832
static void rb_clone_setup(VALUE clone, VALUE obj)
Definition: newobj.h:173
static void rb_dup_setup(VALUE dup, VALUE obj)
Definition: newobj.h:190
#define rb_fd_init
Initialises the :given :rb_fdset_t.
Definition: posix.h:63
#define rb_fd_set
Sets the given fd to the rb_fdset_t.
Definition: posix.h:54
fd_set rb_fdset_t
The data structure which wraps the fd_set bitmap used by select(2).
Definition: posix.h:48
void rb_ary_detransient(VALUE a)
Destructively converts an array of transient backend into ordinal one.
Definition: array.c:458
static long rb_array_len(VALUE a)
Queries the length of the array.
Definition: rarray.h:317
@ RARRAY_EMBED_LEN_SHIFT
Where ::RARRAY_EMBED_LEN_MASK resides.
Definition: rarray.h:165
@ RVALUE_EMBED_LEN_MAX
Max possible number of objects that can be embedded.
Definition: rbasic.h:55
int rb_big_sign(VALUE num)
The "sign" of a bignum.
Definition: bignum.c:6788
#define RCLASS_SUPER
Just another name of rb_class_get_superclass.
Definition: rclass.h:44
VALUE rb_data_object_wrap(VALUE klass, void *datap, RUBY_DATA_FUNC dmark, RUBY_DATA_FUNC dfree)
This is the primitive way to wrap an existing C struct into RData.
Definition: gc.c:2978
static VALUE rb_data_object_alloc(VALUE klass, void *data, RUBY_DATA_FUNC dmark, RUBY_DATA_FUNC dfree)
Definition: rdata.h:367
static VALUE rb_data_object_make(VALUE klass, RUBY_DATA_FUNC mark_func, RUBY_DATA_FUNC free_func, void **datap, size_t size)
This is an implementation detail of Data_Make_Struct.
Definition: rdata.h:358
VALUE rb_data_object_zalloc(VALUE klass, size_t size, RUBY_DATA_FUNC dmark, RUBY_DATA_FUNC dfree)
Identical to rb_data_object_wrap(), except it allocates a new data region internally instead of takin...
Definition: gc.c:2986
void(* RUBY_DATA_FUNC)(void *)
This is the type of callbacks registered to RData.
Definition: rdata.h:108
static VALUE rb_obj_wb_unprotect(VALUE x, const char *filename, int line)
This is the implementation of RB_OBJ_WB_UNPROTECT().
Definition: rgengc.h:363
void rb_gc_writebarrier(VALUE old, VALUE young)
This is the implementation of RB_OBJ_WRITE().
Definition: gc.c:8721
void rb_gc_writebarrier_unprotect(VALUE obj)
This is the implementation of RB_OBJ_WB_UNPROTECT().
Definition: gc.c:8757
VALUE rb_hash_set_ifnone(VALUE hash, VALUE ifnone)
This is the implementation detail of RHASH_SET_IFNONE.
Definition: hash.c:99
struct st_table * rb_hash_tbl(VALUE hash, const char *file, int line)
This is the implementation detail of RHASH_TBL.
Definition: hash.c:1621
size_t rb_hash_size_num(VALUE hash)
This is the implementation detail of RHASH_SIZE.
Definition: hash.c:2986
@ ROBJECT_EMBED_LEN_MAX
Max possible number of instance variables that can be embedded.
Definition: robject.h:84
VALUE rb_str_export_locale(VALUE obj)
Identical to rb_str_export(), except it converts into the locale encoding instead.
Definition: string.c:1266
char * rb_string_value_cstr(volatile VALUE *ptr)
Identical to rb_string_value_ptr(), except it additionally checks for the contents for viability as a...
Definition: string.c:2575
VALUE rb_string_value(volatile VALUE *ptr)
Identical to rb_str_to_str(), except it fills the passed pointer with the converted object.
Definition: string.c:2459
VALUE rb_str_export(VALUE obj)
Identical to rb_str_to_str(), except it additionally converts the string into default external encodi...
Definition: string.c:1260
char * rb_string_value_ptr(volatile VALUE *ptr)
Identical to rb_str_to_str(), except it returns the converted string's backend memory region.
Definition: string.c:2470
VALUE rb_str_to_str(VALUE obj)
Identical to rb_check_string_type(), except it raises exceptions in case of conversion failures.
Definition: string.c:1570
VALUE rb_struct_aset(VALUE st, VALUE k, VALUE v)
Resembles Struct#[]=.
Definition: struct.c:1221
VALUE rb_struct_size(VALUE st)
Returns the number of struct members.
Definition: struct.c:1474
VALUE rb_struct_aref(VALUE st, VALUE k)
Resembles Struct#[].
Definition: struct.c:1183
VALUE rb_data_typed_object_wrap(VALUE klass, void *datap, const rb_data_type_t *type)
This is the primitive way to wrap an existing C struct into RTypedData.
Definition: gc.c:2994
VALUE rb_data_typed_object_zalloc(VALUE klass, size_t size, const rb_data_type_t *type)
Identical to rb_data_typed_object_wrap(), except it allocates a new data region internally instead of...
Definition: gc.c:3002
static VALUE rb_data_typed_object_alloc(VALUE klass, void *datap, const rb_data_type_t *type)
Definition: rtypeddata.h:599
static VALUE rb_data_typed_object_make(VALUE klass, const rb_data_type_t *type, void **datap, size_t size)
While we don't stop you from using this function, it seems to be an implementation detail of TypedDat...
Definition: rtypeddata.h:590
VALUE rb_argv0
The value of $0 at process bootup.
Definition: ruby.c:1566
VALUE rb_get_argv(void)
Queries the arguments passed to the current process that you can access from Ruby as ARGV.
Definition: io.c:13963
void * rb_load_file_str(VALUE file)
Identical to rb_load_file(), except it takes the argument as a Ruby's string instead of C's.
Definition: ruby.c:2410
void * rb_load_file(const char *file)
Loads the given file.
Definition: ruby.c:2403
VALUE rb_get_path(VALUE obj)
Converts an object to a path.
Definition: file.c:245
const char * rb_class2name(VALUE klass)
Queries the name of the passed class.
Definition: variable.c:317
VALUE rb_require(const char *feature)
Identical to rb_require_string(), except it takes C's string instead of Ruby's.
Definition: load.c:1273
const char * rb_obj_classname(VALUE obj)
Queries the name of the class of the passed object.
Definition: variable.c:326
void rb_p(VALUE obj)
Inspects an object.
Definition: io.c:8670
int ruby_vsnprintf(char *str, size_t n, char const *fmt, va_list ap)
Identical to ruby_snprintf(), except it takes a va_list.
Definition: sprintf.c:1008
VALUE rb_get_path_no_checksafe(VALUE)
Definition: file.c:239
int ruby_native_thread_p(void)
Queries if the thread which calls this function is a ruby's thread.
Definition: thread.c:5338
int ruby_snprintf(char *str, size_t n, char const *fmt,...)
Our own locale-insensitive version of snprintf(3).
Definition: sprintf.c:1035
int rb_thread_fd_select(int nfds, rb_fdset_t *rfds, rb_fdset_t *wfds, rb_fdset_t *efds, struct timeval *timeout)
Waits for multiple file descriptors at once.
Definition: thread.c:4118
short rb_num2short(VALUE num)
Converts an instance of rb_cNumeric into C's short.
Definition: numeric.c:3340
unsigned short rb_num2ushort(VALUE num)
Converts an instance of rb_cNumeric into C's unsigned short.
Definition: numeric.c:3358
short rb_fix2short(VALUE num)
Identical to rb_num2short().
Definition: numeric.c:3349
unsigned short rb_fix2ushort(VALUE num)
Identical to rb_num2ushort().
Definition: numeric.c:3368
static short rb_num2short_inline(VALUE x)
Identical to rb_num2short().
Definition: short.h:105
@ RUBY_Qtrue
@ RUBY_SPECIAL_SHIFT
Least significant 8 bits are reserved.
@ RUBY_FIXNUM_FLAG
Flag to denote a fixnum.
@ RUBY_Qnil
@ RUBY_FLONUM_MASK
Bit mask detecting a flonum.
@ RUBY_FLONUM_FLAG
Flag to denote a flonum.
@ RUBY_Qundef
Represents so-called undef.
@ RUBY_SYMBOL_FLAG
Flag to denote a static symbol.
@ RUBY_IMMEDIATE_MASK
Bit mask detecting special consts.
@ RUBY_Qfalse
#define _(args)
This was a transition path from K&R to ANSI.
Definition: stdarg.h:35
const VALUE ary[RARRAY_EMBED_LEN_MAX]
Embedded elements.
struct RBasic basic
Basic part, including flags and class.
const VALUE shared_root
Parent of the array.
long capa
Capacity of *ptr.
long len
Number of elements of the array.
const VALUE * ptr
Pointer to the C array that holds the elements of the array.
Ruby's object's, base components.
Definition: rbasic.h:64
const VALUE klass
Class of an object.
Definition: rbasic.h:88
VALUE flags
Per-object flags.
Definition: rbasic.h:77
Internal header for Complex.
RUBY_DATA_FUNC dfree
This function is called when the object is no longer used.
void * data
Pointer to the actual C level struct that you want to wrap.
RUBY_DATA_FUNC dmark
This function is called when the object is experiencing GC marks.
struct RBasic basic
Basic part, including flags and class.
Ruby's File and IO.
struct RBasic basic
Basic part, including flags and class.
struct rb_io_t * fptr
IO's specific fields.
Ruby's ordinal objects.
struct st_table * iv_index_tbl
This is a table that holds instance variable name to index mapping.
struct RBasic basic
Basic part, including flags and class.
VALUE * ivptr
Pointer to a C array that holds instance variables.
uint32_t numiv
Number of instance variables.
VALUE ary[ROBJECT_EMBED_LEN_MAX]
Embedded instance variables.
Internal header for Rational.
Ruby's regular expression.
struct RBasic basic
Basic part, including flags and class.
const VALUE src
Source code of this expression.
struct re_pattern_buffer * ptr
The pattern buffer.
unsigned long usecnt
Reference count.
Ruby's String.
struct RBasic basic
Basic part, including flags and class.
long capa
Capacity of *ptr.
long len
Length of the string, not including terminating NUL character.
VALUE shared
Parent of the string.
char * ptr
Pointer to the contents of the string.
"Typed" user data.
const rb_data_type_t * type
This field stores various information about how Ruby should handle a data.
VALUE typed_flag
This has to be always 1.
void * data
Pointer to the actual C level struct that you want to wrap.
struct RBasic basic
The part that all ruby objects have in common.
comment represents a sequence of comment lines.
Definition: parserstate.h:33
Definition: lex.c:34
Definition: lexer.h:99
Decomposed Enumerator::ArithmeicSequence.
CREF (Class REFerence)
This is the struct that holds necessary info for a struct.
size_t(* dsize)(const void *)
This function is to query the size of the underlying memory regions.
RUBY_DATA_FUNC dfree
This function is called when the object is no longer used.
void * data
Type-specific static data.
void * reserved[1]
This field is reserved for future extension.
RUBY_DATA_FUNC dcompact
This function is called when the object is relocated.
RUBY_DATA_FUNC dmark
This function is called when the object is experiencing GC marks.
const char * wrap_struct_name
Name of structs of this kind.
VALUE flags
Type-specific behavioural characteristics.
const rb_data_type_t * parent
Parent of this class.
The data structure which wraps the fd_set bitmap used by select(2).
Ruby's IO, metadata and buffers.
Definition: io.h:99
rb_cref_t * cref
class reference, should be marked
const rb_iseq_t *const iseqptr
iseq pointer, should be separated from iseqval
Internal header for Class.
Definition: st.c:133
IFUNC (Internal FUNCtion)
SVAR (Special VARiable)
const VALUE cref_or_me
class reference or rb_method_entry_t
void rb_nativethread_lock_lock(rb_nativethread_lock_t *lock)
Blocks until the current thread obtains a lock.
Definition: thread.c:295
rb_nativethread_id_t rb_nativethread_self(void)
Queries the ID of the native thread that is calling this function.
void rb_nativethread_lock_unlock(rb_nativethread_lock_t *lock)
Releases a lock.
Definition: thread.c:301
void rb_nativethread_lock_initialize(rb_nativethread_lock_t *lock)
Fills the passed lock with an initial value.
Definition: thread.c:283
void rb_nativethread_lock_destroy(rb_nativethread_lock_t *lock)
Destroys the passed mutex.
Definition: thread.c:289
Definition: dtoa.c:302
uintptr_t ID
Type that represents a Ruby identifier such as a variable name.
Definition: value.h:52
uintptr_t VALUE
Type that represents a Ruby object.
Definition: value.h:40
static enum ruby_value_type rb_type(VALUE obj)
Identical to RB_BUILTIN_TYPE(), except it can also accept special constants.
Definition: value_type.h:224
static bool rb_integer_type_p(VALUE obj)
Queries if the object is an instance of rb_cInteger.
Definition: value_type.h:203
@ RUBY_T_SYMBOL
Definition: value_type.h:134
@ RUBY_T_MATCH
Definition: value_type.h:127
@ RUBY_T_MODULE
Definition: value_type.h:117
@ RUBY_T_ICLASS
Hidden classes known as IClasses.
Definition: value_type.h:140
@ RUBY_T_MOVED
Definition: value_type.h:142
@ RUBY_T_FIXNUM
Integers formerly known as Fixnums.
Definition: value_type.h:135
@ RUBY_T_IMEMO
Definition: value_type.h:138
@ RUBY_T_NODE
Definition: value_type.h:139
@ RUBY_T_OBJECT
Definition: value_type.h:115
@ RUBY_T_DATA
Definition: value_type.h:126
@ RUBY_T_FALSE
Definition: value_type.h:133
@ RUBY_T_UNDEF
Definition: value_type.h:136
@ RUBY_T_COMPLEX
Definition: value_type.h:128
@ RUBY_T_STRING
Definition: value_type.h:119
@ RUBY_T_HASH
Definition: value_type.h:122
@ RUBY_T_NIL
Definition: value_type.h:131
@ RUBY_T_CLASS
Definition: value_type.h:116
@ RUBY_T_ARRAY
Definition: value_type.h:121
@ RUBY_T_MASK
Bitmask of ruby_value_type.
Definition: value_type.h:144
@ RUBY_T_RATIONAL
Definition: value_type.h:129
@ RUBY_T_ZOMBIE
Definition: value_type.h:141
@ RUBY_T_BIGNUM
Definition: value_type.h:124
@ RUBY_T_TRUE
Definition: value_type.h:132
@ RUBY_T_FLOAT
Definition: value_type.h:118
@ RUBY_T_STRUCT
Definition: value_type.h:123
@ RUBY_T_NONE
Non-object (swept etc.)
Definition: value_type.h:113
@ RUBY_T_REGEXP
Definition: value_type.h:120
@ RUBY_T_FILE
Definition: value_type.h:125
void * ruby_xrealloc(void *ptr, size_t newsiz)
Resize the storage instance.
Definition: gc.c:14191
void * ruby_xrealloc2(void *ptr, size_t newelems, size_t newsiz)
Identical to ruby_xrealloc(), except it resizes the given storage instance to newelems * newsiz bytes...
Definition: gc.c:14201
void ruby_xfree(void *ptr)
Deallocates a storage instance.
Definition: gc.c:12226
void * ruby_xmalloc2(size_t nelems, size_t elemsiz)
Identical to ruby_xmalloc(), except it allocates nelems * elemsiz bytes.
Definition: gc.c:14171
void * ruby_xmalloc(size_t size)
Allocates a storage instance.
Definition: gc.c:14161
void * ruby_xcalloc(size_t nelems, size_t elemsiz)
Identical to ruby_xmalloc2(), except it returns a zero-filled storage instance.
Definition: gc.c:14181